Buchungskalender: Abschluss – Zustimmung in Textform auch für den Buchungskalender
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b2a0ff5d53
commit
38020bfdff
3 files changed
+64
-13
No files matched your search
@@ -115,7 +115,7 @@ function AnleitungPanel({ customerId, projectId, feature, reloadKey }) {
|
||||
)
|
||||
}
|
||||
|
||||
// Zustimmung des Kunden in Textform (Terminplaner und Webshop im Modus on): Haken, Datum, Weg und die Textvorlage fuer den Chat. Die Pflichtangaben
|
||||
// Zustimmung des Kunden in Textform (Terminplaner, Webshop und Buchungskalender im Modus on): Haken, Datum, Weg und die Textvorlage fuer den Chat. Die Pflichtangaben
|
||||
// prueft textformBereit (funktionenView); das Portal prueft sie noch einmal. Links nur als geprueftes https (textformAnsicht).
|
||||
function TextformPanel({ funktion, feld, value, onChange, projectId, today, disabled }) {
|
||||
const ansicht = textformAnsicht(feld, funktion)
|
||||
@@ -268,7 +268,7 @@ const LEERE_TEXTFORM = { confirmed: false, date: '', channel: '' }
|
||||
|
||||
export default function CustomerFunktionen({ customerId }) {
|
||||
const [projects, setProjects] = useState(null)
|
||||
const [felder, setFelder] = useState({ termine: null, shop: null }) // Portal-Felder termine und shop: { textformNoetig, avvVersion, links }
|
||||
const [felder, setFelder] = useState({ termine: null, shop: null, unterkunft: null }) // Portal-Felder termine, shop und unterkunft: { textformNoetig, avvVersion, links }
|
||||
const [textform, setTextform] = useState(LEERE_TEXTFORM)
|
||||
const [error, setError] = useState(null)
|
||||
const [confirm, setConfirm] = useState(null) // { projectId, key, action }
|
||||
@@ -285,7 +285,7 @@ export default function CustomerFunktionen({ customerId }) {
|
||||
const load = useCallback(() => {
|
||||
setError(null)
|
||||
getFunktionen(customerId)
|
||||
.then(({ projects: list, termine, shop: shopFeld }) => { setProjects(list || []); setFelder({ termine: termine || null, shop: shopFeld || null }) })
|
||||
.then(({ projects: list, termine, shop: shopFeld, unterkunft: ukFeld }) => { setProjects(list || []); setFelder({ termine: termine || null, shop: shopFeld || null, unterkunft: ukFeld || null }) })
|
||||
.catch((err) => setError(err.message || 'Funktionen konnten nicht geladen werden.'))
|
||||
}, [customerId])
|
||||
const loadShop = useCallback(() => {
|
||||
@@ -301,7 +301,7 @@ export default function CustomerFunktionen({ customerId }) {
|
||||
.catch((err) => setUnterkunftFehler(err.message || 'Daten des Buchungskalenders konnten nicht geladen werden.'))
|
||||
}, [customerId])
|
||||
useEffect(() => { load(); loadShop(); loadUnterkunft() }, [load, loadShop, loadUnterkunft])
|
||||
const nachEntscheidung = () => Promise.all([getFunktionen(customerId).then(({ projects: list, termine, shop: shopFeld }) => { setProjects(list || []); setFelder({ termine: termine || null, shop: shopFeld || null }) }), loadShop(), loadUnterkunft()])
|
||||
const nachEntscheidung = () => Promise.all([getFunktionen(customerId).then(({ projects: list, termine, shop: shopFeld, unterkunft: ukFeld }) => { setProjects(list || []); setFelder({ termine: termine || null, shop: shopFeld || null, unterkunft: ukFeld || null }) }), loadShop(), loadUnterkunft()])
|
||||
|
||||
const save = async () => {
|
||||
const { projectId, key, action } = confirm
|
||||
|
||||
Reference in new issue
Block a user