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,16 +275,18 @@ 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>
|
||||||
<Button
|
{!isCompletedCycle && (
|
||||||
onClick={() => {
|
<Button
|
||||||
setTrackElement("Cycle issues page");
|
onClick={() => {
|
||||||
toggleCreateIssueModal(true, EIssuesStoreType.CYCLE);
|
setTrackElement("Cycle issues page");
|
||||||
}}
|
toggleCreateIssueModal(true, EIssuesStoreType.CYCLE);
|
||||||
size="sm"
|
}}
|
||||||
prependIcon={<Plus />}
|
size="sm"
|
||||||
>
|
prependIcon={<Plus />}
|
||||||
Add Issue
|
>
|
||||||
</Button>
|
Add Issue
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<button
|
<button
|
||||||
|
Loading…
Reference in New Issue
Block a user