AP2.3c: Slice-bewusstes Laden und hoisted InitiativeOperationsProvider.
Test Suite / pytest-backend (push) Waiting to run
Test Suite / lint-backend (push) Waiting to run
Test Suite / compose-smoke (push) Waiting to run
Test Suite / k6 /api/health Baseline (push) Blocked by required conditions
Test Suite / playwright-smoke (push) Blocked by required conditions
Deploy Development / deploy (push) Has been cancelled
Test Suite / pytest-backend (push) Waiting to run
Test Suite / lint-backend (push) Waiting to run
Test Suite / compose-smoke (push) Waiting to run
Test Suite / k6 /api/health Baseline (push) Blocked by required conditions
Test Suite / playwright-smoke (push) Blocked by required conditions
Deploy Development / deploy (push) Has been cancelled
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
90934453e6
commit
1b55d8558c
6 files changed
+308
-140
No files matched your search
@@ -1,13 +1,6 @@
|
||||
import { InitiativeOperationsProvider } from '../context/InitiativeOperationsContext.jsx'
|
||||
import { useProgramScope } from '../context/ProgramScopeContext.jsx'
|
||||
|
||||
export function ScopedInitiativeProvider({ initiativeId: initiativeIdProp, children }) {
|
||||
const { initiativeId: scopeInitiativeId } = useProgramScope()
|
||||
const initiativeId = initiativeIdProp || scopeInitiativeId
|
||||
|
||||
return (
|
||||
<InitiativeOperationsProvider initiativeId={initiativeId}>
|
||||
{children}
|
||||
</InitiativeOperationsProvider>
|
||||
)
|
||||
/**
|
||||
* AP2.3c — Scope-Gate ohne eigenen Data-Provider (Provider in ProgramScopeContext).
|
||||
*/
|
||||
export function ScopedInitiativeProvider({ children }) {
|
||||
return children
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { InitiativeOperationsProvider } from '../context/InitiativeOperationsContext.jsx'
|
||||
import { useProgramScope } from '../context/ProgramScopeContext.jsx'
|
||||
|
||||
/** AP2.3c — ein Provider pro Vorhaben-Scope (unter ProgramScope). */
|
||||
export function ScopedOperationsBridge({ children }) {
|
||||
const { initiativeId } = useProgramScope()
|
||||
return (
|
||||
<InitiativeOperationsProvider initiativeId={initiativeId || null}>
|
||||
{children}
|
||||
</InitiativeOperationsProvider>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user