Skip to content

Commit 474a5ec

Browse files
added status and assignee options
1 parent 68c50a4 commit 474a5ec

File tree

3 files changed

+56
-19
lines changed

3 files changed

+56
-19
lines changed
Lines changed: 42 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,52 @@
11
{
22
"cardData": [
33
{
4-
"Id": "Task 1",
4+
"id": "Task 1",
55
"label": "Task - 29001",
6-
"Title": "Task - 29001",
7-
"Status": "Open",
8-
"Summary": "Analyze customer requirements.",
9-
"Priority": "High",
10-
"Tags": "Bug, Release Bug",
11-
"RankId": 1,
12-
"Assignee": "Nancy Davloio"
6+
"status": "Open",
7+
"summary": "Analyze customer requirements.",
8+
"priority": "High",
9+
"tags": "Bug, Release Bug",
10+
"rankId": 1,
11+
"assignee": "Nancy Davloio"
1312
},
1413
{
15-
"Id": "Task 2",
14+
"id": "Task 2",
1615
"label": "Task - 29002",
17-
"Title": "Task - 29002",
18-
"Status": "InProgress",
19-
"Summary": "Add responsive support to applicaton",
20-
"Priority": "Low",
21-
"Tags": "Story, Kanban",
22-
"RankId": 1,
23-
"Assignee": "Nancy Davloio"
16+
"status": "InProgress",
17+
"summary": "Add responsive support to applicaton",
18+
"priority": "Low",
19+
"tags": "Story, Kanban",
20+
"rankId": 1,
21+
"assignee": "Nancy Davloio"
22+
}
23+
],
24+
"statusOptions": [
25+
{
26+
"label": "To Do",
27+
"value": "Open"
28+
},
29+
{
30+
"label": "In Progress",
31+
"value": "InProgress"
32+
},
33+
{
34+
"label": "In Review",
35+
"value": "Review"
36+
},
37+
{
38+
"label": "Done",
39+
"value": "Close"
40+
}
41+
],
42+
"assigneeOptions": [
43+
{
44+
"id": "1",
45+
"name": "Nancy Davloio"
46+
},
47+
{
48+
"id": "1",
49+
"name": "Andrew Fuller"
2450
}
2551
]
2652
}

lowcoder-comp-kanban/src/kanbanPropertyView.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,16 @@ export const KanbanPropertyView = React.memo((props: Props) => {
1616
<>
1717
<Section name="Basic">
1818
{children.data.propertyView({})}
19-
{/* {children.data.propertyView({ label: "Data" })} */}
20-
{children.cardView.getPropertyView()}
19+
{children.statusOptions.propertyView({
20+
label: 'Status Options'
21+
})}
22+
{children.assigneeOptions.propertyView({
23+
label: 'Assignee Options'
24+
})}
2125
</Section>
26+
<Section name="Card View">
27+
{children.cardView.getPropertyView()}
28+
</Section>
2229
<Section name="Interaction">
2330
{children.onEvent.propertyView()}
2431
</Section>

lowcoder-comp-kanban/src/kanbanTypes.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@ import {
55
styleControl,
66
AutoHeightControl,
77
BoolControl,
8+
jsonControl,
9+
toJSONObjectArray,
810
uiChildren,
911
RecordConstructorToComp,
1012
RecordConstructorToView,
1113
} from 'lowcoder-sdk';
1214
import { trans } from "./i18n/comps";
1315
import { KanbanOptionControl } from './kanbanOptionsControl';
1416
import { CardViewControl } from './cardViewControl';
17+
import * as dataSource from "./datasource.json";
1518

1619
type RecordConstructorToComp<T> = typeof RecordConstructorToComp;
1720
type RecordConstructorToView<T> = typeof RecordConstructorToView;
@@ -117,8 +120,9 @@ const childrenMap = {
117120
},
118121
] as const),
119122
cardContentStyles: styleControl(CompStyles),
123+
statusOptions: jsonControl(toJSONObjectArray, dataSource.statusOptions),
124+
assigneeOptions: jsonControl(toJSONObjectArray, dataSource.assigneeOptions),
120125
cardView: CardViewControl,
121-
// data: jsonValueExposingStateControl("data", dataSource.cardData),
122126
};
123127

124128
export const KanbanInitComp = (function () {

0 commit comments

Comments
 (0)