예제
칸반 보드
Resource 참조를 레인에 표시하고 App 소유 이동 명령을 제출합니다.
공개 계약
ResourceBoard실행 미리 보기
실시간칸반 Resource 보드
카드는 도메인 참조입니다. 드래그는 명령을 제안하며 App이 승인하고 저장합니다.
ResourceBoardQueued
In progress
Completed
복사 가능한 소스
코드 예시
TSX
import { ResourceBoard } from "@nexia/sdk/host";
export function KanbanBoardExample() {
return (
<ResourceBoard
state="ready"
readOnly
projection={{
board_key: "work-orders",
version: 1,
lanes: [
{
key: "queued",
label: "Queued",
count: 1,
accepted_actions: ["move"],
cards: [
{
resource: {
app_key: "manufacturing",
resource_key: "work_order",
resource_id: "1042",
display: "WO-1042 · Pump housing",
},
summary: [
{
key: "priority",
label: "Priority",
value: "High",
},
],
version: 1,
allowed_actions: ["move"],
},
],
},
{
key: "done",
label: "Completed",
count: 0,
accepted_actions: ["move"],
cards: [],
},
],
}}
labels={{
board: "Work-order board",
laneCount: (lane, count) => `${lane} · ${count}`,
moveCard: (resource) => `Move ${resource}`,
moveError: (reason) => `Move rejected: ${reason}`,
}}
/>
);
}