diff --git a/apps/app/components/core/board-view/all-boards.tsx b/apps/app/components/core/board-view/all-boards.tsx index f5b03267c..9a1b96b2a 100644 --- a/apps/app/components/core/board-view/all-boards.tsx +++ b/apps/app/components/core/board-view/all-boards.tsx @@ -40,8 +40,13 @@ export const AllBoards: React.FC = ({
-
+
{Object.keys(groupedByIssues).map((singleGroup, index) => { + const currentState = + selectedGroup === "state_detail.name" + ? states?.find((s) => s.name === singleGroup) + : null; + const stateId = selectedGroup === "state_detail.name" ? states?.find((s) => s.name === singleGroup)?.id ?? null @@ -56,6 +61,7 @@ export const AllBoards: React.FC = ({ | null; groupTitle: string; bgColor?: string; @@ -28,6 +23,7 @@ type Props = { export const BoardHeader: React.FC = ({ groupedByIssues, + currentState, selectedGroup, groupTitle, bgColor, @@ -54,22 +50,19 @@ export const BoardHeader: React.FC = ({ return (
+ {currentState && getStateGroupIcon(currentState.group, "20", "20", bgColor)}

= ({ ? assignees : addSpaceIfCamelCase(groupTitle)}

- {groupedByIssues[groupTitle].length} + + {groupedByIssues[groupTitle].length} +
) : ( - - Add issue - + customButton={ + } - className="mt-1" optionsPosition="left" noBorder > diff --git a/apps/app/components/core/board-view/single-issue.tsx b/apps/app/components/core/board-view/single-issue.tsx index d3c9be75f..b425a97e9 100644 --- a/apps/app/components/core/board-view/single-issue.tsx +++ b/apps/app/components/core/board-view/single-issue.tsx @@ -184,15 +184,15 @@ export const SingleBoardIssue: React.FC = ({ return (
-
+
{!isNotAllowed && (
{type && !isNotAllowed && ( @@ -214,19 +214,19 @@ export const SingleBoardIssue: React.FC = ({ {properties.key && ( -
+
{issue.project_detail.identifier}-{issue.sequence_id}
)}
{issue.name}
-
+
{properties.priority && selectedGroup !== "priority" && ( = ({
- + Drop issue here to delete
)} diff --git a/apps/app/components/icons/backlog-state-icon.tsx b/apps/app/components/icons/backlog-state-icon.tsx new file mode 100644 index 000000000..48ae09524 --- /dev/null +++ b/apps/app/components/icons/backlog-state-icon.tsx @@ -0,0 +1,21 @@ +import React from "react"; + +import type { Props } from "./types"; + +export const BacklogStateIcon: React.FC = ({ + width = "20", + height = "20", + className, + color = "#858e96", +}) => ( + + + +); diff --git a/apps/app/components/icons/cancelled-state-icon.tsx b/apps/app/components/icons/cancelled-state-icon.tsx new file mode 100644 index 000000000..5829146ff --- /dev/null +++ b/apps/app/components/icons/cancelled-state-icon.tsx @@ -0,0 +1,78 @@ +import React from "react"; + +import type { Props } from "./types"; + +export const CancelledStateIcon: React.FC = ({ + width = "20", + height = "20", + className, + color = "#f2655a", +}) => ( + + + + + + + + + + + + + +); diff --git a/apps/app/components/icons/completed-state-icon.tsx b/apps/app/components/icons/completed-state-icon.tsx new file mode 100644 index 000000000..584245d58 --- /dev/null +++ b/apps/app/components/icons/completed-state-icon.tsx @@ -0,0 +1,69 @@ +import React from "react"; + +import type { Props } from "./types"; + +export const CompletedStateIcon: React.FC = ({ + width = "20", + height = "20", + className, + color = "#438af3", +}) => ( + + + + + + + + + + + + +); diff --git a/apps/app/components/icons/index.ts b/apps/app/components/icons/index.ts index dfcb2c5dc..e07e22c29 100644 --- a/apps/app/components/icons/index.ts +++ b/apps/app/components/icons/index.ts @@ -1,12 +1,15 @@ export * from "./attachment-icon"; +export * from "./backlog-state-icon"; export * from "./blocked-icon"; export * from "./blocker-icon"; export * from "./bolt-icon"; export * from "./calendar-month-icon"; export * from "./cancel-icon"; +export * from "./cancelled-state-icon"; export * from "./clipboard-icon"; export * from "./comment-icon"; export * from "./completed-cycle-icon"; +export * from "./completed-state-icon"; export * from "./current-cycle-icon"; export * from "./cycle-icon"; export * from "./discord-icon"; @@ -16,6 +19,7 @@ export * from "./ellipsis-horizontal-icon"; export * from "./external-link-icon"; export * from "./github-icon"; export * from "./heartbeat-icon"; +export * from "./started-state-icon"; export * from "./layer-diagonal-icon"; export * from "./lock-icon"; export * from "./menu-icon"; @@ -23,8 +27,11 @@ export * from "./plus-icon"; export * from "./question-mark-circle-icon"; export * from "./setting-icon"; export * from "./signal-cellular-icon"; +export * from "./started-state-icon"; +export * from "./state-group-icon"; export * from "./tag-icon"; export * from "./tune-icon"; +export * from "./unstarted-state-icon"; export * from "./upcoming-cycle-icon"; export * from "./user-group-icon"; export * from "./user-icon-circle"; diff --git a/apps/app/components/icons/started-state-icon.tsx b/apps/app/components/icons/started-state-icon.tsx new file mode 100644 index 000000000..20de01537 --- /dev/null +++ b/apps/app/components/icons/started-state-icon.tsx @@ -0,0 +1,77 @@ +import React from "react"; + +import type { Props } from "./types"; + +export const StartedStateIcon: React.FC = ({ + width = "20", + height = "20", + className, + color = "#fbb040", +}) => ( + + + + + + + + + + + + +); diff --git a/apps/app/components/icons/state-group-icon.tsx b/apps/app/components/icons/state-group-icon.tsx new file mode 100644 index 000000000..17b13f0b2 --- /dev/null +++ b/apps/app/components/icons/state-group-icon.tsx @@ -0,0 +1,29 @@ +import { + BacklogStateIcon, + CancelledStateIcon, + CompletedStateIcon, + StartedStateIcon, + UnstartedStateIcon, +} from "components/icons"; + +export const getStateGroupIcon = ( + stateGroup: "backlog" | "unstarted" | "started" | "completed" | "cancelled", + width = "20", + height = "20", + color?: string +) => { + switch (stateGroup) { + case "backlog": + return ; + case "unstarted": + return ; + case "started": + return ; + case "completed": + return ; + case "cancelled": + return ; + default: + return <>; + } +}; diff --git a/apps/app/components/icons/unstarted-state-icon.tsx b/apps/app/components/icons/unstarted-state-icon.tsx new file mode 100644 index 000000000..0fcad39ea --- /dev/null +++ b/apps/app/components/icons/unstarted-state-icon.tsx @@ -0,0 +1,59 @@ +import React from "react"; + +import type { Props } from "./types"; + +export const UnstartedStateIcon: React.FC = ({ + width = "20", + height = "20", + className, + color = "#858e96", +}) => ( + + + + + + + + + + +); diff --git a/apps/app/components/issues/view-select/priority.tsx b/apps/app/components/issues/view-select/priority.tsx index 52a911f5e..f47ea934d 100644 --- a/apps/app/components/issues/view-select/priority.tsx +++ b/apps/app/components/issues/view-select/priority.tsx @@ -23,34 +23,38 @@ export const ViewPrioritySelect: React.FC = ({ isNotAllowed, }) => ( - - {getPriorityIcon( - issue.priority && issue.priority !== "" ? issue.priority ?? "" : "None", - "text-sm" - )} - - - } value={issue.state} onChange={(data: string) => { partialUpdateIssue({ priority: data }); }} maxHeight="md" - buttonClassName={`flex ${ - isNotAllowed ? "cursor-not-allowed" : "cursor-pointer" - } items-center gap-x-2 rounded px-2 py-0.5 capitalize shadow-sm focus:border-indigo-500 focus:outline-none focus:ring-1 focus:ring-indigo-500 ${ - issue.priority === "urgent" - ? "bg-red-100 text-red-600 hover:bg-red-100" - : issue.priority === "high" - ? "bg-orange-100 text-orange-500 hover:bg-orange-100" - : issue.priority === "medium" - ? "bg-yellow-100 text-yellow-500 hover:bg-yellow-100" - : issue.priority === "low" - ? "bg-green-100 text-green-500 hover:bg-green-100" - : "bg-gray-100" - } border-none`} + customButton={ + + } noChevron disabled={isNotAllowed} selfPositioned={selfPositioned} diff --git a/apps/app/components/ui/custom-menu.tsx b/apps/app/components/ui/custom-menu.tsx index e34390eff..d82a1a347 100644 --- a/apps/app/components/ui/custom-menu.tsx +++ b/apps/app/components/ui/custom-menu.tsx @@ -15,6 +15,7 @@ type Props = { textAlignment?: "left" | "center" | "right"; noBorder?: boolean; optionsPosition?: "left" | "right"; + customButton?: JSX.Element; }; type MenuItemProps = { @@ -34,42 +35,47 @@ const CustomMenu = ({ textAlignment, noBorder = false, optionsPosition = "right", + customButton, }: Props) => ( -
- {ellipsis ? ( - - - - ) : ( - - {label} - {!noBorder && - )} -
+ {customButton ? ( + {customButton} + ) : ( +
+ {ellipsis ? ( + + + + ) : ( + + {label} + {!noBorder && + )} +
+ )}
- - {label} - {!noChevron && !disabled && + {customButton ? ( + {customButton} + ) : ( + + {label} + {!noChevron && !disabled && + )}