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,
XMarkIcon,
} from "@heroicons/react/24/outline";
import { getStateGroupIcon } from "components/icons";
import { ExclamationIcon, getStateGroupIcon } from "components/icons";
// helpers
import { getStatesList } from "helpers/state.helper";
// types
@ -683,6 +683,12 @@ export const IssuesView: React.FC<Props> = ({
{groupedByIssues ? (
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" ? (
<AllLists
type={type}

View File

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

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB