feat: sidebar progress (#252)
* feat: cycle assignees and labels progress added * fix: build fix * feat: sidebar progress stats added and refactor * refactor: progress stats and cycle sidebar * feat: module sidebar progress added * feat: sidebar progress no assignee added * feat: states tab added --------- Co-authored-by: Anmol Singh Bhatia <anmolsinghbhatia1001@gmail.com>
This commit is contained in:
parent
76cc634a46
commit
c978632938
6 changed files with 260 additions and 35 deletions
|
|
@ -3,7 +3,10 @@ import React, { useState } from "react";
|
|||
import { useRouter } from "next/router";
|
||||
|
||||
import useSWR, { mutate } from "swr";
|
||||
|
||||
import { NextPageContext } from "next";
|
||||
// icons
|
||||
import { ArrowLeftIcon, ListBulletIcon, PlusIcon } from "@heroicons/react/24/outline";
|
||||
import { CyclesIcon } from "components/icons";
|
||||
// lib
|
||||
import { requiredAdmin, requiredAuth } from "lib/auth";
|
||||
// layouts
|
||||
|
|
@ -21,19 +24,17 @@ import projectService from "services/project.service";
|
|||
// ui
|
||||
import { CustomMenu, EmptySpace, EmptySpaceItem, Spinner } from "components/ui";
|
||||
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs";
|
||||
// icons
|
||||
import { ArrowLeftIcon, ListBulletIcon, PlusIcon } from "@heroicons/react/24/outline";
|
||||
import { CyclesIcon } from "components/icons";
|
||||
// types
|
||||
import { CycleIssueResponse, IIssue, SelectIssue, UserAuth } from "types";
|
||||
import { NextPageContext } from "next";
|
||||
import { CycleIssueResponse, IIssue, IIssueLabels, SelectIssue, UserAuth } from "types";
|
||||
// fetch-keys
|
||||
import {
|
||||
CYCLE_ISSUES,
|
||||
CYCLE_LIST,
|
||||
PROJECT_ISSUES_LIST,
|
||||
PROJECT_DETAILS,
|
||||
PROJECT_ISSUE_LABELS,
|
||||
CYCLE_DETAILS,
|
||||
PROJECT_MEMBERS,
|
||||
} from "constants/fetch-keys";
|
||||
|
||||
const SingleCycle: React.FC<UserAuth> = (props) => {
|
||||
|
|
@ -95,6 +96,7 @@ const SingleCycle: React.FC<UserAuth> = (props) => {
|
|||
)
|
||||
: null
|
||||
);
|
||||
|
||||
const cycleIssuesArray = cycleIssues?.map((issue) => ({
|
||||
...issue.issue_detail,
|
||||
sub_issues_count: issue.sub_issues_count,
|
||||
|
|
@ -241,6 +243,7 @@ const SingleCycle: React.FC<UserAuth> = (props) => {
|
|||
</div>
|
||||
)}
|
||||
<CycleDetailSidebar
|
||||
issues={cycleIssuesArray ?? []}
|
||||
cycle={cycleDetails}
|
||||
isOpen={cycleSidebar}
|
||||
cycleIssues={cycleIssues ?? []}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,17 @@
|
|||
import React, { useState } from "react";
|
||||
|
||||
import { useRouter } from "next/router";
|
||||
|
||||
import { NextPageContext } from "next";
|
||||
import useSWR, { mutate } from "swr";
|
||||
|
||||
// icons
|
||||
import {
|
||||
ArrowLeftIcon,
|
||||
ListBulletIcon,
|
||||
PlusIcon,
|
||||
RectangleGroupIcon,
|
||||
RectangleStackIcon,
|
||||
} from "@heroicons/react/24/outline";
|
||||
// lib
|
||||
import { requiredAdmin, requiredAuth } from "lib/auth";
|
||||
// services
|
||||
|
|
@ -20,14 +28,6 @@ import { DeleteModuleModal, ModuleDetailsSidebar } from "components/modules";
|
|||
// ui
|
||||
import { CustomMenu, EmptySpace, EmptySpaceItem, Spinner } from "components/ui";
|
||||
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs";
|
||||
// icons
|
||||
import {
|
||||
ArrowLeftIcon,
|
||||
ListBulletIcon,
|
||||
PlusIcon,
|
||||
RectangleGroupIcon,
|
||||
RectangleStackIcon,
|
||||
} from "@heroicons/react/24/outline";
|
||||
// types
|
||||
import {
|
||||
IIssue,
|
||||
|
|
@ -37,7 +37,7 @@ import {
|
|||
SelectModuleType,
|
||||
UserAuth,
|
||||
} from "types";
|
||||
import { NextPageContext } from "next";
|
||||
|
||||
// fetch-keys
|
||||
import {
|
||||
MODULE_DETAILS,
|
||||
|
|
@ -262,6 +262,7 @@ const SingleModule: React.FC<UserAuth> = (props) => {
|
|||
</div>
|
||||
)}
|
||||
<ModuleDetailsSidebar
|
||||
issues={moduleIssuesArray ?? []}
|
||||
module={moduleDetails}
|
||||
isOpen={moduleSidebar}
|
||||
moduleIssues={moduleIssues}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue