Buchungskalender: Team-API wie Webshop (anfrage null, Stripe-Status)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9d01d38a45
commit
35b0438d00
4 files changed
+33
-9
No files matched your search
@@ -30,7 +30,8 @@ async function zaehle(collection, queries, was) {
|
||||
}
|
||||
}
|
||||
|
||||
const stripeZustand = (einst) => (!einst?.stripeAccountId ? 'keins' : einst.stripeStatus?.charges_enabled === true ? 'aktiv' : 'onboarding')
|
||||
/** stripeStatus (JSON-Objekt in ukEinstellungen, schon geparst) oder null. */
|
||||
const stripeStatus = (roh) => (roh !== null && typeof roh === 'object' && !Array.isArray(roh) ? roh : null)
|
||||
|
||||
async function projektStand(project, feature) {
|
||||
let einst = null
|
||||
@@ -53,8 +54,8 @@ async function projektStand(project, feature) {
|
||||
projectId: project.$id,
|
||||
name: project.projectName || '',
|
||||
state: feature?.state || 'off',
|
||||
anfrage: anfrageAnsichtTeam(einst),
|
||||
stripe: { status: stripeZustand(einst) },
|
||||
anfrage: einst?.anfrageStatus ? anfrageAnsichtTeam(einst) : null,
|
||||
stripe: { accountId: Boolean(einst?.stripeAccountId), status: stripeStatus(einst?.stripeStatus) },
|
||||
unterkuenfte,
|
||||
offeneAnfragen,
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user