chore: cycle store restructuring (#6405)
This commit is contained in:
parent
a908bf9edd
commit
8acea7f599
6 changed files with 7 additions and 3 deletions
|
|
@ -82,10 +82,10 @@ export const CycleListItemAction: FC<Props> = observer((props) => {
|
|||
|
||||
// derived values
|
||||
const cycleStatus = cycleDetails.status ? (cycleDetails.status.toLocaleLowerCase() as TCycleGroups) : "draft";
|
||||
|
||||
|
||||
const showIssueCount = useMemo(() => cycleStatus === "draft" || cycleStatus === "upcoming", [cycleStatus]);
|
||||
|
||||
const showTransferIssues = cycleDetails.pending_issues > 0 && cycleStatus === "completed";
|
||||
const showTransferIssues = routerProjectId && cycleDetails.pending_issues > 0 && cycleStatus === "completed";
|
||||
|
||||
const isEditingAllowed = allowPermissions(
|
||||
[EUserPermissions.ADMIN, EUserPermissions.MEMBER],
|
||||
|
|
|
|||
|
|
@ -177,6 +177,7 @@ export const CycleQuickActions: React.FC<Props> = observer((props) => {
|
|||
projectId={projectId}
|
||||
workspaceSlug={workspaceSlug}
|
||||
transferrableIssuesCount={cycleDetails.pending_issues}
|
||||
cycleName={cycleDetails.name}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { useContext } from "react";
|
|||
// mobx store
|
||||
import { StoreContext } from "@/lib/store-context";
|
||||
// types
|
||||
import { ICycleStore } from "@/store/cycle.store";
|
||||
import { ICycleStore } from "@/plane-web/store/cycle";
|
||||
|
||||
export const useCycle = (): ICycleStore => {
|
||||
const context = useContext(StoreContext);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue