Funktionen: Terminplaner als zweite Funktion (Team-Route, Kundenansicht)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ae1886c030
commit
9e8fd33713
12 files changed
+434
-33
No files matched your search
@@ -1,7 +1,8 @@
|
||||
import { config } from '../../config.js'
|
||||
import { Query, createDocument, getDocument, listDocuments, updateDocument } from '../appwriteAdmin.js'
|
||||
import { createDocument, getDocument, updateDocument } from '../appwriteAdmin.js'
|
||||
import { analyseHosts } from '../analyse.js'
|
||||
import { withLocks } from '../keyedLock.js'
|
||||
import { findActiveBySiteKey } from '../siteFeatures.js'
|
||||
import { termineAus } from './schalter.js'
|
||||
import { pruefeNow, pruefeText } from './util.js'
|
||||
|
||||
@@ -95,12 +96,7 @@ export async function kontextPerSiteKey(siteKey, now = new Date()) {
|
||||
if (gemerkt && gemerkt.bis > nowMs) return gemerkt.ctx
|
||||
|
||||
const stand = generation
|
||||
const [feature] = await listDocuments(config.collections.portalFeatures, [
|
||||
Query.equal('siteKey', siteKey),
|
||||
Query.equal('featureKey', FUNKTION),
|
||||
Query.equal('state', 'active'),
|
||||
Query.limit(1),
|
||||
])
|
||||
const feature = await findActiveBySiteKey(siteKey, FUNKTION)
|
||||
let ctx = feature ? await baueKontext(feature) : null
|
||||
if (ctx && !ctx.einstellung) ctx = null
|
||||
if (stand === generation) merke(siteKey, ctx, nowMs)
|
||||
|
||||
Reference in new issue
Block a user