forked from github/plane
[WEB-924] chore: remove Add Issues
button from completed cycles header. (#4153)
* [WEB-924] chore: remove `Add Issues` button from completed cycles header. * fix: analytics button.
This commit is contained in:
parent
f805acbcef
commit
3c2b2e3ed6
@ -142,6 +142,7 @@ export const CycleIssuesHeader: React.FC = observer(() => {
|
|||||||
|
|
||||||
// derived values
|
// derived values
|
||||||
const cycleDetails = cycleId ? getCycleById(cycleId.toString()) : undefined;
|
const cycleDetails = cycleId ? getCycleById(cycleId.toString()) : undefined;
|
||||||
|
const isCompletedCycle = cycleDetails?.status?.toLocaleLowerCase() === "completed";
|
||||||
const canUserCreateIssue =
|
const canUserCreateIssue =
|
||||||
currentProjectRole && [EUserProjectRoles.ADMIN, EUserProjectRoles.MEMBER].includes(currentProjectRole);
|
currentProjectRole && [EUserProjectRoles.ADMIN, EUserProjectRoles.MEMBER].includes(currentProjectRole);
|
||||||
|
|
||||||
@ -274,6 +275,7 @@ export const CycleIssuesHeader: React.FC = observer(() => {
|
|||||||
<Button onClick={() => setAnalyticsModal(true)} variant="neutral-primary" size="sm">
|
<Button onClick={() => setAnalyticsModal(true)} variant="neutral-primary" size="sm">
|
||||||
Analytics
|
Analytics
|
||||||
</Button>
|
</Button>
|
||||||
|
{!isCompletedCycle && (
|
||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setTrackElement("Cycle issues page");
|
setTrackElement("Cycle issues page");
|
||||||
@ -284,6 +286,7 @@ export const CycleIssuesHeader: React.FC = observer(() => {
|
|||||||
>
|
>
|
||||||
Add Issue
|
Add Issue
|
||||||
</Button>
|
</Button>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<button
|
<button
|
||||||
|
Loading…
Reference in New Issue
Block a user