Skip to main content

CnLockedBanner

Inline notice that the current object is held by another session's pessimistic lock. Mounted automatically by CnDetailPage when useObjectLock().locked === true && lockedByMe === false.

Props

PropTypeDefaultDescription
lockedBystring''Display name (or username) of the user holding the lock. Comes from useObjectLock().lockedBy.
expiresAtDate | nullnullLock expiration. When set, renders an "Expires in N min" sub-line.
messagestringt('Locked by {user}')Override the rendered headline message.

Usage

<CnLockedBanner
v-if="lock.locked && !lock.lockedByMe"
:locked-by="lock.lockedBy"
:expires-at="lock.expiresAt" />

The lock object comes from useObjectLock. Mount the banner above any editor surface (form dialog, inline edit grid) so users know to wait.