Buchungskalender: Verwaltungs-API für Vermieter
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a94b50fbc1
commit
d0ab92658a
5 files changed
+1486
-8
No files matched your search
@@ -83,6 +83,8 @@ export async function speichereUnterkunft(featureId, felder, id) {
|
||||
return lesen('ukUnterkuenfte', await createDocument(config.collections.ukUnterkuenfte, { ...daten, featureId }))
|
||||
}
|
||||
|
||||
export const loescheUnterkunft = (id) => deleteDocument(config.collections.ukUnterkuenfte, id)
|
||||
|
||||
// ---- ukPreise (1:1 je Unterkunft)
|
||||
|
||||
async function preiseDok(unterkunftId) {
|
||||
@@ -99,6 +101,11 @@ export async function speicherePreise(unterkunftId, featureId, felder) {
|
||||
return lesen('ukPreise', await createDocument(config.collections.ukPreise, { ...daten, unterkunftId, featureId }))
|
||||
}
|
||||
|
||||
export async function loeschePreise(unterkunftId) {
|
||||
const vorhanden = await preiseDok(unterkunftId)
|
||||
if (vorhanden) await deleteDocument(config.collections.ukPreise, vorhanden.$id)
|
||||
}
|
||||
|
||||
// ---- ukSperren
|
||||
|
||||
export const listeSperren = (unterkunftId) => liste('ukSperren', [Query.equal('unterkunftId', unterkunftId)])
|
||||
@@ -108,6 +115,7 @@ export async function legeSperreAn(felder) {
|
||||
}
|
||||
|
||||
export const loescheSperre = (id) => deleteDocument(config.collections.ukSperren, id)
|
||||
export const ladeSperre = (id) => ladeDok('ukSperren', id)
|
||||
|
||||
// ---- ukAnfragen
|
||||
|
||||
|
||||
Reference in new issue
Block a user