Approvals and close
Period lock
PeriodLock
Open, closed and locked periods. An agent asks whether a date can be posted; a person closes and locks.
The person sees
| Period | Status | Status |
|---|---|---|
| 2025 | Locked | |
| January 2026 | Closed for posting | |
| February 2026 | Open | |
| March 2026 | Open |
booki_version=$(npm view @booki-aui/react@latest version) &&
ui_sdk_version=$(npm view "@booki-aui/react@$booki_version" peerDependencies.@ui-sdk/core) &&
pnpm add --save-exact "@booki-aui/core@$booki_version" "@booki-aui/react@$booki_version" "@booki-aui/styles@$booki_version" \
"@ui-sdk/core@$ui_sdk_version" "@ui-sdk/react@$ui_sdk_version"Try the bridge
Open this page in a browser and run the example in the console with a fresh preview. Read the current ref from the snapshot before acting.
const { agent } = window
const entry = agent.snapshot().filter(
(entry) => !entry.offPage && entry.component === "period-lock",
)[0]
const result = await agent.act({
steps: [{
ref: entry.ref,
action: "assertPostingAllowed",
args: ["2026-02-10"],
}],
})
console.log(result.ok) // true2026-02-10 can be posted: the period is open.
Import from @booki-aui/react. For Booki's default styling, add import "@booki-aui/styles".