Buchungskalender: Abschluss – L1 Textform-Zustimmung fuer die Aktivierung ohne Zahlung (Server, GET-Feld unterkunft)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4f9fb6b109
commit
6d35674c1e
5 files changed
+179
-9
No files matched your search
@@ -31,6 +31,7 @@ import { driftWarnung, einbauanleitung, ticketStand } from '../../services/termi
|
||||
import { freischaltHindernis, meldeFreigeschaltet } from '../../services/termine/freischaltung.js'
|
||||
import { ladeStand } from '../../services/termine/kontext.js'
|
||||
import { shopTextformNoetig } from '../../services/shop/schalter.js'
|
||||
import { unterkunftTextformNoetig } from '../../services/unterkunft/schalter.js'
|
||||
import { termineTextformNoetig } from '../../services/termine/schalter.js'
|
||||
|
||||
/**
|
||||
@@ -121,8 +122,8 @@ async function notiereK16Fehlt(projectId, doc) {
|
||||
|
||||
const ticketExists = async (ticketId) => (await readTicket(ticketId)) !== null
|
||||
|
||||
/** Verlangt die Aktivierung dieser Funktion fuer diese Adresse die Zustimmung in Textform? Nur Terminplaner und Webshop, je nach Modus und Pilotliste der Funktion. */
|
||||
const textformVerlangt = { termine: termineTextformNoetig, shop: shopTextformNoetig }
|
||||
/** Verlangt die Aktivierung dieser Funktion fuer diese Adresse die Zustimmung in Textform? Nur Terminplaner, Webshop und Buchungskalender, je nach Modus und Pilotliste der Funktion. */
|
||||
const textformVerlangt = { termine: termineTextformNoetig, shop: shopTextformNoetig, unterkunft: unterkunftTextformNoetig }
|
||||
|
||||
/**
|
||||
* Zustimmung des Kunden in Textform fuer die Aktivierung des Terminplaners oder des Webshops durch das Team (F13a; AVV Webshop,
|
||||
@@ -147,7 +148,7 @@ async function unterlagenAlsAnhang(key) {
|
||||
return await featureLegalAttachments(key, { ohne: ['widerruf'] })
|
||||
} catch (err) {
|
||||
console.error('[funktionen-admin] Rechtsunterlagen (PDF) fuer die Freischaltung nicht lesbar:', err.message)
|
||||
const funktion = key === 'shop' ? 'Der Webshop' : 'Der Terminplaner'
|
||||
const funktion = key === 'shop' ? 'Der Webshop' : key === 'unterkunft' ? 'Der Buchungskalender' : 'Der Terminplaner'
|
||||
throw Object.assign(new Error(`Die Rechtsunterlagen (PDF) sind nicht lesbar. ${funktion} wurde nicht freigeschaltet. Bitte später erneut versuchen.`), { status: 503 })
|
||||
}
|
||||
}
|
||||
@@ -199,10 +200,20 @@ async function shopFeld(customerId) {
|
||||
}
|
||||
}
|
||||
|
||||
/** Dasselbe fuer den Buchungskalender (AVV Buchungskalender, Vorbemerkung Abs. 2): Fassung = config.unterkunft.fassung. */
|
||||
async function unterkunftFeld() {
|
||||
const { lb, avv } = featureLegalPaths('unterkunft')
|
||||
return {
|
||||
textformNoetig: unterkunftTextformNoetig(),
|
||||
avvVersion: config.unterkunft.fassung,
|
||||
links: { lb: `${config.publicBaseUrl}${lb}`, avv: `${config.publicBaseUrl}${avv}` },
|
||||
}
|
||||
}
|
||||
|
||||
funktionenAdminRouter.get('/:customerId', async (req, res) => {
|
||||
try {
|
||||
const projects = await adminView(req.params.customerId)
|
||||
res.json({ projects, termine: await termineFeld(req.params.customerId), shop: await shopFeld(req.params.customerId) })
|
||||
res.json({ projects, termine: await termineFeld(req.params.customerId), shop: await shopFeld(req.params.customerId), unterkunft: await unterkunftFeld() })
|
||||
} catch (err) {
|
||||
sendError(res, err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user