feat: completed cycle message added (#565)

This commit is contained in:
Anmol Singh Bhatia 2023-03-28 18:48:57 +05:30 committed by GitHub
parent ccd03a4a45
commit e2eeec8f79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 34 additions and 22 deletions

View File

@ -30,7 +30,7 @@ import {
TrashIcon, TrashIcon,
XMarkIcon, XMarkIcon,
} from "@heroicons/react/24/outline"; } from "@heroicons/react/24/outline";
import { getStateGroupIcon } from "components/icons"; import { ExclamationIcon, getStateGroupIcon } from "components/icons";
// helpers // helpers
import { getStatesList } from "helpers/state.helper"; import { getStatesList } from "helpers/state.helper";
// types // types
@ -683,6 +683,12 @@ export const IssuesView: React.FC<Props> = ({
{groupedByIssues ? ( {groupedByIssues ? (
isNotEmpty ? ( isNotEmpty ? (
<> <>
{isCompleted && (
<div className="flex items-center gap-2 text-sm mb-4 text-gray-500">
<ExclamationIcon height={14} width={14} />
<span>Completed cycles are not editable.</span>
</div>
)}
{issueView === "list" ? ( {issueView === "list" ? (
<AllLists <AllLists
type={type} type={type}

View File

@ -9,7 +9,7 @@ import cyclesService from "services/cycles.service";
// components // components
import { DeleteCycleModal, SingleCycleCard } from "components/cycles"; import { DeleteCycleModal, SingleCycleCard } from "components/cycles";
// icons // icons
import { CompletedCycleIcon } from "components/icons"; import { CompletedCycleIcon, ExclamationIcon } from "components/icons";
// types // types
import { ICycle, SelectCycleType } from "types"; import { ICycle, SelectCycleType } from "types";
// fetch-keys // fetch-keys
@ -63,16 +63,22 @@ export const CompletedCyclesList: React.FC<CompletedCyclesListProps> = ({
/> />
{completedCycles ? ( {completedCycles ? (
completedCycles.completed_cycles.length > 0 ? ( completedCycles.completed_cycles.length > 0 ? (
<div className="grid grid-cols-1 gap-9 md:grid-cols-2 lg:grid-cols-3"> <div className="flex flex-col gap-4">
{completedCycles.completed_cycles.map((cycle) => ( <div className="flex items-center gap-2 text-sm text-gray-500">
<SingleCycleCard <ExclamationIcon height={14} width={14} />
key={cycle.id} <span>Completed cycles are not editable.</span>
cycle={cycle} </div>
handleDeleteCycle={() => handleDeleteCycle(cycle)} <div className="grid grid-cols-1 gap-9 md:grid-cols-2 lg:grid-cols-3">
handleEditCycle={() => handleEditCycle(cycle)} {completedCycles.completed_cycles.map((cycle) => (
isCompleted <SingleCycleCard
/> key={cycle.id}
))} cycle={cycle}
handleDeleteCycle={() => handleDeleteCycle(cycle)}
handleEditCycle={() => handleEditCycle(cycle)}
isCompleted
/>
))}
</div>
</div> </div>
) : ( ) : (
<EmptyState <EmptyState

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB