From 8cbc54fb5cf38cbd3b783acbd53a6f5a75258511 Mon Sep 17 00:00:00 2001 From: maceteligolden Date: Thu, 30 Nov 2023 14:37:45 +0100 Subject: [PATCH 1/3] update:add on border around a task card --- apps/web/lib/components/kanban-card.tsx | 30 +++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/apps/web/lib/components/kanban-card.tsx b/apps/web/lib/components/kanban-card.tsx index fcd0a08c0..849211720 100644 --- a/apps/web/lib/components/kanban-card.tsx +++ b/apps/web/lib/components/kanban-card.tsx @@ -16,6 +16,27 @@ function getStyle(provided: DraggableProvided, style: any) { }; } +function setCommentIconColor(commentType: "tagged" | "untagged") { + + let style; + + if(commentType === "tagged"){ + style = { + backgroundColor: '#D95F5F' + } + }else if(commentType === "untagged"){ + style = { + backgroundColor: '#27AE60' + } + } else { + style = { + + } + } + + return style +} + function Tag({title, backgroundColor, color}: { title: string, backgroundColor: string, @@ -170,6 +191,15 @@ export default function Item(props: any) { + {item.hasComment !== "none" && + (
+
+
+
) + } ); } From 62c7f6d366b2e88b6e5ec76741b3bba95e00cfe4 Mon Sep 17 00:00:00 2001 From: maceteligolden Date: Thu, 30 Nov 2023 14:38:04 +0100 Subject: [PATCH 2/3] update:add new props --- apps/web/lib/components/Kanban.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/apps/web/lib/components/Kanban.tsx b/apps/web/lib/components/Kanban.tsx index 974f962b8..b6b0a42d9 100644 --- a/apps/web/lib/components/Kanban.tsx +++ b/apps/web/lib/components/Kanban.tsx @@ -46,7 +46,8 @@ function headerStyleChanger(snapshot: DraggableStateSnapshot, bgColor: any){ * @param param0 * @returns */ -function InnerItemList({items}: { +function InnerItemList({items, title}: { + title: string, items: any[] }) { return ( @@ -61,6 +62,11 @@ function InnerItemList({items}: { isDragging={dragSnapshot.isDragging} isGroupedOver={Boolean(dragSnapshot.combineTargetFor)} provided={dragProvided} + style={title === 'review' && { + borderWidth: '1px', + borderColor: '#6FCF97', + borderStyle: 'solid' + }} /> )} @@ -82,14 +88,14 @@ function InnerList(props: { dropProvided: DroppableProvided, dropSnapshot: DroppableStateSnapshot }) { - const { items, dropProvided, dropSnapshot } = props; + const { items, dropProvided, dropSnapshot, title } = props; return (
- + <> {dropProvided.placeholder} From bf4d3338d61894525dd014a229ee156f43de5b06 Mon Sep 17 00:00:00 2001 From: maceteligolden Date: Thu, 30 Nov 2023 14:38:18 +0100 Subject: [PATCH 3/3] chore:add new key to demo data --- apps/web/pages/kanban/index.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/web/pages/kanban/index.tsx b/apps/web/pages/kanban/index.tsx index 2c0d46ba6..128eb1f55 100644 --- a/apps/web/pages/kanban/index.tsx +++ b/apps/web/pages/kanban/index.tsx @@ -29,6 +29,7 @@ const demoData = { { id: '1', content: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', + hasComment: "tagged", tags: [ { id: 'tag-1', @@ -48,6 +49,7 @@ const demoData = { { id: '4', content: 'demo content2', + hasComment: "none", tags: [ { id: 'tag-1', @@ -69,6 +71,7 @@ const demoData = { { id: '2', content: 'another content', + hasComment: "untagged", tags: [ { id: 'tag-1', @@ -88,6 +91,7 @@ const demoData = { { id: '5', content: 'another content2', + hasComment: "none", tags: [ { id: 'tag-1', @@ -109,6 +113,7 @@ const demoData = { { id: '3', content: 'a simple tes', + hasComment: "none", tags: [ { id: 'tag-1', @@ -128,6 +133,7 @@ const demoData = { { id: '6', content: 'a simple tes', + hasComment: "none", tags: [ { id: 'tag-1',