Skip to content

Commit

Permalink
Add selectable users
Browse files Browse the repository at this point in the history
  • Loading branch information
WhiteHoodHacker committed Dec 1, 2023
1 parent 4034a08 commit 60890fd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions client/src/@types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ interface Arrow {
color: string;
}
interface User {
id: number;
name: string;
email?: string;
profilePicUrl?: string;
Expand Down
2 changes: 2 additions & 0 deletions client/src/components/Board/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,11 @@ export default function Board() {
],
users: [
{
id: 1,
name: "Alice"
},
{
id: 2,
name: "Bob"
}
]
Expand Down
10 changes: 5 additions & 5 deletions client/src/components/TaskDetailsPane/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ export default function TaskDetailsPane(props: Props) {
height: 630
});
const [showDependencyGraph, setShowDependencyGraph] = useState(false);
const personas = [
{value: '1', label: 'Alice'},
{value: '2', label: 'Bob'}
];
const taskOptions = otherTasks.map((t) => ({
value: t.id.toString(),
label: t.title
}));
const userOptions = props.users.map((u) => ({
value: u.id.toString(),
label: u.name
}));

let taskIdsDependingOn: any[] = [];
arrows.map((arrow: Arrow) => {
Expand Down Expand Up @@ -185,7 +185,7 @@ export default function TaskDetailsPane(props: Props) {
<Select
isMulti
name="colors"
options={personas}
options={userOptions}
className="basic-multi-select"
classNamePrefix="select"
/>
Expand Down

0 comments on commit 60890fd

Please sign in to comment.