35 lines
867 B
React
35 lines
867 B
React
|
|
import { useInitiativeOperations } from '../../context/InitiativeOperationsContext.jsx'
|
||
|
|
import { BacklogSection } from '../../components/BacklogSection.jsx'
|
||
|
|
|
||
|
|
export function InitiativeInboxPage() {
|
||
|
|
const {
|
||
|
|
backlogItems,
|
||
|
|
capabilities,
|
||
|
|
formBusy,
|
||
|
|
error,
|
||
|
|
handleCreateBacklog,
|
||
|
|
handleBacklogStatus,
|
||
|
|
handleConvertBacklog,
|
||
|
|
handleDeleteBacklog,
|
||
|
|
} = useInitiativeOperations()
|
||
|
|
|
||
|
|
if (!capabilities.has('kairo.initiative.read')) {
|
||
|
|
return null
|
||
|
|
}
|
||
|
|
|
||
|
|
return (
|
||
|
|
<>
|
||
|
|
{error && <p className="error">{error}</p>}
|
||
|
|
<BacklogSection
|
||
|
|
items={backlogItems}
|
||
|
|
canManage={capabilities.has('kairo.backlog.manage')}
|
||
|
|
onCreate={handleCreateBacklog}
|
||
|
|
onUpdateStatus={handleBacklogStatus}
|
||
|
|
onConvert={handleConvertBacklog}
|
||
|
|
onDelete={handleDeleteBacklog}
|
||
|
|
busy={formBusy}
|
||
|
|
/>
|
||
|
|
</>
|
||
|
|
)
|
||
|
|
}
|