Skip to main content

CnTasksCard

Inline tasks widget for detail pages. Fetches tasks from the OpenRegister API and displays them sorted by due date (soonest first). Shows status icons, assignee names (with CnUserActionMenu), and due dates. Overdue tasks are highlighted in red.

Wraps: CnDetailCard, CnUserActionMenu

Try it

Loading CnTasksCard playground…

Usage

<CnTasksCard
register-id="uuid-register"
schema-id="uuid-schema"
object-id="uuid-object"
@show-all="openSidebarTasksTab" />

Pass pre-translated labels when your app handles i18n:

<CnTasksCard
register-id="reg"
schema-id="schema"
object-id="obj"
:title-label="t('myapp', 'Tasks')"
:no-tasks-label="t('myapp', 'No tasks')"
:show-all-label="t('myapp', 'Show all')"
:unassigned-label="t('myapp', 'Unassigned')" />

Status icons

Status valueIconColor
'completed'Checkbox checkedGreen (success)
'active' / 'in-process'Progress clockBlue (primary)
'terminated'Close circleRed (error)
Any otherEmpty checkboxGrey

Props

PropTypeRequiredDefaultDescription
registerIdStringOpenRegister register UUID
schemaIdStringOpenRegister schema UUID
objectIdStringObject UUID
apiBaseString'/apps/openregister/api'Base URL for OpenRegister API calls
maxDisplayNumber5Maximum number of tasks to show before the "Show all" footer appears
collapsibleBooleanfalseWhether the card supports collapse/expand
titleLabelString'Tasks'Card title
noTasksLabelString'No tasks'Empty state text
showAllLabelString'Show all'Footer link label
unassignedLabelString'Unassigned'Text shown when a task has no assignee

Events

EventPayloadDescription
show-allEmitted when the "Show all" footer link is clicked

Reference (auto-generated)

The tables below are generated from the SFC source via vue-docgen-cli. They reflect what's actually in CnTasksCard.vue and update automatically whenever the component changes.

Props

NameTypeRequiredDefaultDescription
registerIdstringOpenRegister register ID
schemaIdstringOpenRegister schema ID
objectIdstringObject UUID
apiBasestring'/apps/openregister/api'Base API URL for OpenRegister
maxDisplaynumber5Maximum number of tasks to display
collapsiblebooleanfalseWhether the card is collapsible
titleLabelstring() =&gt; t('nextcloud-vue', 'Tasks')
noTasksLabelstring() =&gt; t('nextcloud-vue', 'No tasks')
showAllLabelstring() =&gt; t('nextcloud-vue', 'Show all')
unassignedLabelstring() =&gt; t('nextcloud-vue', 'Unassigned')

Events

NamePayloadDescription
show-all