[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:
Prateek Shourya 2024-04-10 13:02:56 +05:30 committed by GitHub
parent f805acbcef
commit 3c2b2e3ed6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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