mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-04 15:07:13 +01:00
prparation for AWs
This commit is contained in:
@@ -9,7 +9,7 @@ import { WizardContext } from './context/wizardStore'
|
|||||||
|
|
||||||
const fetcher = (path: string) => fetch(path).then((r) => r.json())
|
const fetcher = (path: string) => fetch(path).then((r) => r.json())
|
||||||
|
|
||||||
export default function MyCalendar() {
|
export default function MyCalendar({ ...props }) {
|
||||||
const { onChange, state } = useContext(WizardContext)
|
const { onChange, state } = useContext(WizardContext)
|
||||||
const { startDate: start, endDate: end } = state.formData
|
const { startDate: start, endDate: end } = state.formData
|
||||||
const startDate = (start && new Date(start)) || null
|
const startDate = (start && new Date(start)) || null
|
||||||
@@ -66,15 +66,15 @@ export default function MyCalendar() {
|
|||||||
if (fetchBookedOnError) {
|
if (fetchBookedOnError) {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
Entschuldige, aber die Buchungszeiten konnten nicht geladen werden.
|
Entschuldigen Sie, aber die Buchungszeiten konnten nicht geladen werden.
|
||||||
Versuchen Sie es später nochmals.
|
Versuchen Sie es später nochmals.
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mb-12 p-6 bg-blue-100 rounded">
|
<div {...props}>
|
||||||
<h2 className="text-xl">Buchungsübersicht</h2>
|
<h2 className="text-xl">Belegungsplan</h2>
|
||||||
<Calendar
|
<Calendar
|
||||||
minDate={new Date()}
|
minDate={new Date()}
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
@@ -107,7 +107,7 @@ export default function MyCalendar() {
|
|||||||
tileClassName={tileClassName}
|
tileClassName={tileClassName}
|
||||||
value={null}
|
value={null}
|
||||||
/>
|
/>
|
||||||
<div className="mt-6 flex justify-center">
|
<div className="mt-3 flex justify-center">
|
||||||
<div>
|
<div>
|
||||||
<div className="inline-block w-5 h-5 bg-green-200 rounded align-text-bottom"></div>
|
<div className="inline-block w-5 h-5 bg-green-200 rounded align-text-bottom"></div>
|
||||||
<span className="ml-2">Frei</span>
|
<span className="ml-2">Frei</span>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import React, { useContext } from 'react'
|
import React, { useContext } from 'react'
|
||||||
import { WizardContext } from './context/wizardStore'
|
import { WizardContext } from './context/wizardStore'
|
||||||
import InputWrapper from '../inputWrapper'
|
import InputWrapper from '../inputWrapper'
|
||||||
|
import Calendar from './calendar'
|
||||||
|
|
||||||
export default function DateSelect() {
|
export default function DateSelect() {
|
||||||
const { onChangeEvent, state } = useContext(WizardContext)
|
const { onChangeEvent, state } = useContext(WizardContext)
|
||||||
@@ -11,6 +12,7 @@ export default function DateSelect() {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<InputWrapper label="Datum" required>
|
<InputWrapper label="Datum" required>
|
||||||
|
<Calendar className="m-6" />
|
||||||
<div className="inline-block mr-6">
|
<div className="inline-block mr-6">
|
||||||
<label className="flabel inline-block w-6 mr-3" htmlFor="startDate">
|
<label className="flabel inline-block w-6 mr-3" htmlFor="startDate">
|
||||||
Von
|
Von
|
||||||
|
|||||||
@@ -54,7 +54,6 @@ function WizardInternal() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Calendar />
|
|
||||||
<form
|
<form
|
||||||
className="form"
|
className="form"
|
||||||
onSubmit={(event) => {
|
onSubmit={(event) => {
|
||||||
@@ -63,7 +62,7 @@ function WizardInternal() {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{dataStoredLoaded && (
|
{dataStoredLoaded && (
|
||||||
<p className="mb-12">
|
<p className="mb-6">
|
||||||
Gespeicherte Daten wurden aus Deinem Browser geladen.{' '}
|
Gespeicherte Daten wurden aus Deinem Browser geladen.{' '}
|
||||||
<a className="link" onClick={forgetData} href="">
|
<a className="link" onClick={forgetData} href="">
|
||||||
Daten wieder vergessen
|
Daten wieder vergessen
|
||||||
|
|||||||
Reference in New Issue
Block a user