diff --git a/web/components/issue-layouts/header/display-filters/index.tsx b/web/components/issue-layouts/display-filters/index.tsx similarity index 100% rename from web/components/issue-layouts/header/display-filters/index.tsx rename to web/components/issue-layouts/display-filters/index.tsx diff --git a/web/components/issue-layouts/header/filters/assignees.tsx b/web/components/issue-layouts/filters/assignees.tsx similarity index 93% rename from web/components/issue-layouts/header/filters/assignees.tsx rename to web/components/issue-layouts/filters/assignees.tsx index f8627c937..2e5c96a47 100644 --- a/web/components/issue-layouts/header/filters/assignees.tsx +++ b/web/components/issue-layouts/filters/assignees.tsx @@ -2,8 +2,8 @@ import React from "react"; // lucide icons import { Check, ChevronDown, ChevronUp } from "lucide-react"; // components -import { FilterHeader } from "./filter-header"; -import { FilterCard } from "./filter-card"; +import { FilterHeader } from "../helpers/filter-header"; +import { FilterOption } from "../helpers/filter-option"; // mobx react lite import { observer } from "mobx-react-lite"; // mobx store @@ -46,7 +46,7 @@ export const FilterAssignees = observer(() => { {issueFilterStore?.projectMembers && issueFilterStore?.projectMembers.length > 0 && issueFilterStore?.projectMembers.map((_member) => ( - { {issueFilterStore?.projectMembers && issueFilterStore?.projectMembers.length > 0 && issueFilterStore?.projectMembers.map((_member) => ( - { {issueFilterStore?.projectLabels && issueFilterStore?.projectLabels.length > 0 && issueFilterStore?.projectLabels.map((_label) => ( - } diff --git a/web/components/issue-layouts/header/filters/priority.tsx b/web/components/issue-layouts/filters/priority.tsx similarity index 95% rename from web/components/issue-layouts/header/filters/priority.tsx rename to web/components/issue-layouts/filters/priority.tsx index 123003809..8baeb20fd 100644 --- a/web/components/issue-layouts/header/filters/priority.tsx +++ b/web/components/issue-layouts/filters/priority.tsx @@ -2,8 +2,8 @@ import React from "react"; // lucide icons import { AlertCircle, SignalHigh, SignalMedium, SignalLow, Ban, Check } from "lucide-react"; // components -import { FilterHeader } from "./filter-header"; -import { FilterCard } from "./filter-card"; +import { FilterHeader } from "../helpers/filter-header"; +import { FilterOption } from "../helpers/filter-option"; // mobx react lite import { observer } from "mobx-react-lite"; // mobx store @@ -68,7 +68,7 @@ export const FilterPriority = observer(() => { {issueFilterStore?.issueRenderFilters?.priority && issueFilterStore?.issueRenderFilters?.priority.length > 0 && issueFilterStore?.issueRenderFilters?.priority.map((_priority) => ( - } diff --git a/web/components/issue-layouts/header/filters/start-date.tsx b/web/components/issue-layouts/filters/start-date.tsx similarity index 77% rename from web/components/issue-layouts/header/filters/start-date.tsx rename to web/components/issue-layouts/filters/start-date.tsx index efcae3be5..4f731ffd9 100644 --- a/web/components/issue-layouts/header/filters/start-date.tsx +++ b/web/components/issue-layouts/filters/start-date.tsx @@ -2,8 +2,8 @@ import React from "react"; // lucide icons import { Check, ChevronDown, ChevronUp } from "lucide-react"; // components -import { FilterHeader } from "./filter-header"; -import { FilterCard } from "./filter-card"; +import { FilterHeader } from "../helpers/filter-header"; +import { FilterOption } from "../helpers/filter-option"; // mobx react lite import { observer } from "mobx-react-lite"; // mobx store @@ -28,7 +28,12 @@ export const FilterStartDate = observer(() => { {issueFilterStore?.issueRenderFilters?.start_date && issueFilterStore?.issueRenderFilters?.start_date.length > 0 && issueFilterStore?.issueRenderFilters?.start_date.map((_startDate) => ( - + ))} )} diff --git a/web/components/issue-layouts/header/filters/state-group.tsx b/web/components/issue-layouts/filters/state-group.tsx similarity index 96% rename from web/components/issue-layouts/header/filters/state-group.tsx rename to web/components/issue-layouts/filters/state-group.tsx index c7211b042..9f2066725 100644 --- a/web/components/issue-layouts/header/filters/state-group.tsx +++ b/web/components/issue-layouts/filters/state-group.tsx @@ -9,8 +9,8 @@ import { StateGroupUnstartedIcon, } from "components/icons"; // components -import { FilterHeader } from "./filter-header"; -import { FilterCard } from "./filter-card"; +import { FilterHeader } from "../helpers/filter-header"; +import { FilterOption } from "../helpers/filter-option"; // mobx react lite import { observer } from "mobx-react-lite"; // mobx store @@ -101,7 +101,7 @@ export const FilterStateGroup = observer(() => { {issueFilterStore?.issueRenderFilters?.state_group && issueFilterStore?.issueRenderFilters?.state_group.length > 0 && issueFilterStore?.issueRenderFilters?.state_group.map((_stateGroup) => ( - } diff --git a/web/components/issue-layouts/header/filters/state.tsx b/web/components/issue-layouts/filters/state.tsx similarity index 91% rename from web/components/issue-layouts/header/filters/state.tsx rename to web/components/issue-layouts/filters/state.tsx index 3b8bfcf12..21f2fde0b 100644 --- a/web/components/issue-layouts/header/filters/state.tsx +++ b/web/components/issue-layouts/filters/state.tsx @@ -3,8 +3,8 @@ import React from "react"; import { Check, ChevronDown, ChevronUp } from "lucide-react"; // components import { StateGroupIcons } from "./state-group"; -import { FilterHeader } from "./filter-header"; -import { FilterCard } from "./filter-card"; +import { FilterHeader } from "../helpers/filter-header"; +import { FilterOption } from "../helpers/filter-option"; // mobx react lite import { observer } from "mobx-react-lite"; // mobx store @@ -34,7 +34,7 @@ export const FilterState = observer(() => { issueFilterStore?.projectStates[_stateGroup] && issueFilterStore?.projectStates[_stateGroup].length > 0 && issueFilterStore?.projectStates[_stateGroup].map((_state: any) => ( - } diff --git a/web/components/issue-layouts/header/filters/target-date.tsx b/web/components/issue-layouts/filters/target-date.tsx similarity index 77% rename from web/components/issue-layouts/header/filters/target-date.tsx rename to web/components/issue-layouts/filters/target-date.tsx index 28320b443..04f5cb2db 100644 --- a/web/components/issue-layouts/header/filters/target-date.tsx +++ b/web/components/issue-layouts/filters/target-date.tsx @@ -2,8 +2,8 @@ import React from "react"; // lucide icons import { Check, ChevronDown, ChevronUp } from "lucide-react"; // components -import { FilterHeader } from "./filter-header"; -import { FilterCard } from "./filter-card"; +import { FilterHeader } from "../helpers/filter-header"; +import { FilterOption } from "../helpers/filter-option"; // mobx react lite import { observer } from "mobx-react-lite"; // mobx store @@ -28,7 +28,12 @@ export const FilterTargetDate = observer(() => { {issueFilterStore?.issueRenderFilters?.due_date && issueFilterStore?.issueRenderFilters?.due_date.length > 0 && issueFilterStore?.issueRenderFilters?.due_date.map((_targetDate) => ( - + ))} )} diff --git a/web/components/issue-layouts/header/filters/filter-header.tsx b/web/components/issue-layouts/helpers/filter-header.tsx similarity index 100% rename from web/components/issue-layouts/header/filters/filter-header.tsx rename to web/components/issue-layouts/helpers/filter-header.tsx diff --git a/web/components/issue-layouts/header/filters/filter-card.tsx b/web/components/issue-layouts/helpers/filter-option.tsx similarity index 68% rename from web/components/issue-layouts/header/filters/filter-card.tsx rename to web/components/issue-layouts/helpers/filter-option.tsx index 3133e65aa..6989156f5 100644 --- a/web/components/issue-layouts/header/filters/filter-card.tsx +++ b/web/components/issue-layouts/helpers/filter-option.tsx @@ -2,18 +2,19 @@ import React from "react"; // lucide icons import { Check } from "lucide-react"; -interface IFilterCard { +interface IFilterOption { isChecked: boolean; icon?: React.ReactNode; title: string; + multiple?: boolean; } -export const FilterCard = ({ isChecked, icon, title }: IFilterCard) => ( +export const FilterOption = ({ isChecked, icon, title, multiple = true }: IFilterOption) => (
{isChecked && }
diff --git a/web/components/issue-layouts/header/layout-filter/index.tsx b/web/components/issue-layouts/layout-selection.tsx similarity index 100% rename from web/components/issue-layouts/header/layout-filter/index.tsx rename to web/components/issue-layouts/layout-selection.tsx diff --git a/web/pages/kanban.tsx b/web/pages/kanban.tsx index a31d39bfc..db533b2c4 100644 --- a/web/pages/kanban.tsx +++ b/web/pages/kanban.tsx @@ -3,8 +3,8 @@ import React from "react"; import useSWR from "swr"; // components import { IssueKanBanViewRoot } from "components/issue-layouts/kanban"; -import { LayoutSelection } from "components/issue-layouts/header/layout-filter"; -import { FilterSelection } from "components/issue-layouts/header/filters"; +import { LayoutSelection } from "components/issue-layouts/layout-selection"; +import { FilterSelection } from "components/issue-layouts/filters"; // mobx store import { useMobxStore } from "lib/mobx/store-provider"; import { RootStore } from "store/root";