refactor: renamed issueEvent prop path name

This commit is contained in:
LAKHAN BAHETI 2024-05-27 12:00:33 +05:30
parent 7a47ce9d1d
commit 379a4de533
18 changed files with 100 additions and 88 deletions

View File

@ -87,7 +87,7 @@ export const InboxIssueMainContent: React.FC<Props> = observer((props) => {
changed_property: Object.keys(data).join(","),
change_details: Object.values(data).join(","),
},
path: router.asPath,
routePath: router.asPath,
});
} catch (error) {
setToast({
@ -102,7 +102,7 @@ export const InboxIssueMainContent: React.FC<Props> = observer((props) => {
changed_property: Object.keys(data).join(","),
change_details: Object.values(data).join(","),
},
path: router.asPath,
routePath: router.asPath,
});
}
},

View File

@ -98,7 +98,7 @@ export const IssueDetailRoot: FC<TIssueDetailRoot> = observer((props) => {
changed_property: Object.keys(data).join(","),
change_details: Object.values(data).join(","),
},
path: router.asPath,
routePath: router.asPath,
});
} catch (error) {
captureIssueEvent({
@ -108,7 +108,7 @@ export const IssueDetailRoot: FC<TIssueDetailRoot> = observer((props) => {
changed_property: Object.keys(data).join(","),
change_details: Object.values(data).join(","),
},
path: router.asPath,
routePath: router.asPath,
});
setToast({
title: "Error!",
@ -129,7 +129,7 @@ export const IssueDetailRoot: FC<TIssueDetailRoot> = observer((props) => {
captureIssueEvent({
eventName: ISSUE_DELETED,
payload: { id: issueId, state: "SUCCESS", element: "Issue detail page" },
path: router.asPath,
routePath: router.asPath,
});
} catch (error) {
setToast({
@ -140,7 +140,7 @@ export const IssueDetailRoot: FC<TIssueDetailRoot> = observer((props) => {
captureIssueEvent({
eventName: ISSUE_DELETED,
payload: { id: issueId, state: "FAILED", element: "Issue detail page" },
path: router.asPath,
routePath: router.asPath,
});
}
},
@ -150,13 +150,13 @@ export const IssueDetailRoot: FC<TIssueDetailRoot> = observer((props) => {
captureIssueEvent({
eventName: ISSUE_ARCHIVED,
payload: { id: issueId, state: "SUCCESS", element: "Issue details page" },
path: router.asPath,
routePath: router.asPath,
});
} catch (error) {
captureIssueEvent({
eventName: ISSUE_ARCHIVED,
payload: { id: issueId, state: "FAILED", element: "Issue details page" },
path: router.asPath,
routePath: router.asPath,
});
}
},
@ -170,7 +170,7 @@ export const IssueDetailRoot: FC<TIssueDetailRoot> = observer((props) => {
changed_property: "cycle_id",
change_details: cycleId,
},
path: router.asPath,
routePath: router.asPath,
});
} catch (error) {
setToast({
@ -185,7 +185,7 @@ export const IssueDetailRoot: FC<TIssueDetailRoot> = observer((props) => {
changed_property: "cycle_id",
change_details: cycleId,
},
path: router.asPath,
routePath: router.asPath,
});
}
},
@ -199,7 +199,7 @@ export const IssueDetailRoot: FC<TIssueDetailRoot> = observer((props) => {
changed_property: "cycle_id",
change_details: cycleId,
},
path: router.asPath,
routePath: router.asPath,
});
} catch (error) {
setToast({
@ -214,7 +214,7 @@ export const IssueDetailRoot: FC<TIssueDetailRoot> = observer((props) => {
changed_property: "cycle_id",
change_details: cycleId,
},
path: router.asPath,
routePath: router.asPath,
});
}
},
@ -240,7 +240,7 @@ export const IssueDetailRoot: FC<TIssueDetailRoot> = observer((props) => {
changed_property: "cycle_id",
change_details: "",
},
path: router.asPath,
routePath: router.asPath,
});
} catch (error) {
captureIssueEvent({
@ -250,7 +250,7 @@ export const IssueDetailRoot: FC<TIssueDetailRoot> = observer((props) => {
changed_property: "cycle_id",
change_details: "",
},
path: router.asPath,
routePath: router.asPath,
});
}
},
@ -264,7 +264,7 @@ export const IssueDetailRoot: FC<TIssueDetailRoot> = observer((props) => {
changed_property: "module_id",
change_details: moduleIds,
},
path: router.asPath,
routePath: router.asPath,
});
} catch (error) {
setToast({
@ -279,7 +279,7 @@ export const IssueDetailRoot: FC<TIssueDetailRoot> = observer((props) => {
changed_property: "module_id",
change_details: moduleIds,
},
path: router.asPath,
routePath: router.asPath,
});
}
},
@ -305,7 +305,7 @@ export const IssueDetailRoot: FC<TIssueDetailRoot> = observer((props) => {
changed_property: "module_id",
change_details: "",
},
path: router.asPath,
routePath: router.asPath,
});
} catch (error) {
captureIssueEvent({
@ -315,7 +315,7 @@ export const IssueDetailRoot: FC<TIssueDetailRoot> = observer((props) => {
changed_property: "module_id",
change_details: "",
},
path: router.asPath,
routePath: router.asPath,
});
}
},

View File

@ -156,14 +156,14 @@ export const CalendarQuickAddIssueForm: React.FC<Props> = observer((props) => {
captureIssueEvent({
eventName: ISSUE_CREATED,
payload: { ...res, state: "SUCCESS", element: "Calendar quick add" },
path: router.asPath,
routePath: router.asPath,
});
})
.catch(() => {
captureIssueEvent({
eventName: ISSUE_CREATED,
payload: { ...payload, state: "FAILED", element: "Calendar quick add" },
path: router.asPath,
routePath: router.asPath,
});
});
}

View File

@ -129,14 +129,14 @@ export const GanttQuickAddIssueForm: React.FC<IGanttQuickAddIssueForm> = observe
captureIssueEvent({
eventName: ISSUE_CREATED,
payload: { ...res, state: "SUCCESS", element: "Gantt quick add" },
path: router.asPath,
routePath: router.asPath,
});
})
.catch(() => {
captureIssueEvent({
eventName: ISSUE_CREATED,
payload: { ...payload, state: "FAILED", element: "Gantt quick add" },
path: router.asPath,
routePath: router.asPath,
});
});
}

View File

@ -176,7 +176,7 @@ export const BaseKanBanRoot: React.FC<IBaseKanBanLayout> = observer((props: IBas
captureIssueEvent({
eventName: ISSUE_DELETED,
payload: { id: draggedIssueId, state: "FAILED", element: "Kanban layout drag & drop" },
path: router.asPath,
routePath: router.asPath,
});
});
};

View File

@ -123,14 +123,14 @@ export const KanBanQuickAddIssueForm: React.FC<IKanBanQuickAddIssueForm> = obser
captureIssueEvent({
eventName: ISSUE_CREATED,
payload: { ...res, state: "SUCCESS", element: "Kanban quick add" },
path: router.asPath,
routePath: router.asPath,
});
})
.catch(() => {
captureIssueEvent({
eventName: ISSUE_CREATED,
payload: { ...payload, state: "FAILED", element: "Kanban quick add" },
path: router.asPath,
routePath: router.asPath,
});
});
}

View File

@ -120,14 +120,14 @@ export const ListQuickAddIssueForm: FC<IListQuickAddIssueForm> = observer((props
captureIssueEvent({
eventName: ISSUE_CREATED,
payload: { ...res, state: "SUCCESS", element: "List quick add" },
path: router.asPath,
routePath: router.asPath,
});
})
.catch(() => {
captureIssueEvent({
eventName: ISSUE_CREATED,
payload: { ...payload, state: "FAILED", element: "List quick add" },
path: router.asPath,
routePath: router.asPath,
});
});
}

View File

@ -93,7 +93,7 @@ export const IssueProperties: React.FC<IIssueProperties> = observer((props) => {
captureIssueEvent({
eventName: ISSUE_UPDATED,
payload: { ...issue, state: "SUCCESS", element: currentLayout },
path: router.asPath,
routePath: router.asPath,
updates: {
changed_property: "state",
change_details: stateId,
@ -108,7 +108,7 @@ export const IssueProperties: React.FC<IIssueProperties> = observer((props) => {
captureIssueEvent({
eventName: ISSUE_UPDATED,
payload: { ...issue, state: "SUCCESS", element: currentLayout },
path: router.asPath,
routePath: router.asPath,
updates: {
changed_property: "priority",
change_details: value,
@ -123,7 +123,7 @@ export const IssueProperties: React.FC<IIssueProperties> = observer((props) => {
captureIssueEvent({
eventName: ISSUE_UPDATED,
payload: { ...issue, state: "SUCCESS", element: currentLayout },
path: router.asPath,
routePath: router.asPath,
updates: {
changed_property: "labels",
change_details: ids,
@ -138,7 +138,7 @@ export const IssueProperties: React.FC<IIssueProperties> = observer((props) => {
captureIssueEvent({
eventName: ISSUE_UPDATED,
payload: { ...issue, state: "SUCCESS", element: currentLayout },
path: router.asPath,
routePath: router.asPath,
updates: {
changed_property: "assignees",
change_details: ids,
@ -163,7 +163,7 @@ export const IssueProperties: React.FC<IIssueProperties> = observer((props) => {
captureIssueEvent({
eventName: ISSUE_UPDATED,
payload: { ...issue, state: "SUCCESS", element: currentLayout },
path: router.asPath,
routePath: router.asPath,
updates: { changed_property: "module_ids", change_details: { module_ids: moduleIds } },
});
},
@ -179,7 +179,7 @@ export const IssueProperties: React.FC<IIssueProperties> = observer((props) => {
captureIssueEvent({
eventName: ISSUE_UPDATED,
payload: { ...issue, state: "SUCCESS", element: currentLayout },
path: router.asPath,
routePath: router.asPath,
updates: { changed_property: "cycle", change_details: { cycle_id: cycleId } },
});
},
@ -193,7 +193,7 @@ export const IssueProperties: React.FC<IIssueProperties> = observer((props) => {
captureIssueEvent({
eventName: ISSUE_UPDATED,
payload: { ...issue, state: "SUCCESS", element: currentLayout },
path: router.asPath,
routePath: router.asPath,
updates: {
changed_property: "start_date",
change_details: date ? renderFormattedPayloadDate(date) : null,
@ -210,7 +210,7 @@ export const IssueProperties: React.FC<IIssueProperties> = observer((props) => {
captureIssueEvent({
eventName: ISSUE_UPDATED,
payload: { ...issue, state: "SUCCESS", element: currentLayout },
path: router.asPath,
routePath: router.asPath,
updates: {
changed_property: "target_date",
change_details: date ? renderFormattedPayloadDate(date) : null,
@ -226,7 +226,7 @@ export const IssueProperties: React.FC<IIssueProperties> = observer((props) => {
captureIssueEvent({
eventName: ISSUE_UPDATED,
payload: { ...issue, state: "SUCCESS", element: currentLayout },
path: router.asPath,
routePath: router.asPath,
updates: {
changed_property: "estimate_point",
change_details: value,

View File

@ -13,7 +13,7 @@ import {
import { ListLayoutLoader } from "@/components/ui";
import { EIssuesStoreType } from "@/constants/issue";
// ui
import { useIssues } from "@/hooks/store";
import { useIssues, useEventTracker } from "@/hooks/store";
export const ArchivedIssueLayoutRoot: React.FC = observer(() => {
// router
@ -21,12 +21,14 @@ export const ArchivedIssueLayoutRoot: React.FC = observer(() => {
const { workspaceSlug, projectId } = router.query;
// hooks
const { issues, issuesFilter } = useIssues(EIssuesStoreType.ARCHIVED);
const { captureIssuesListOpenedEvent } = useEventTracker();
useSWR(
workspaceSlug && projectId ? `ARCHIVED_ISSUES_${workspaceSlug.toString()}_${projectId.toString()}` : null,
async () => {
if (workspaceSlug && projectId) {
await issuesFilter?.fetchFilters(workspaceSlug.toString(), projectId.toString());
captureIssuesListOpenedEvent(router.asPath, issuesFilter?.issueFilters?.filters);
await issues?.fetchIssues(
workspaceSlug.toString(),
projectId.toString(),

View File

@ -41,7 +41,7 @@ export const SpreadsheetCycleColumn: React.FC<Props> = observer((props) => {
element: "Spreadsheet layout",
},
updates: { changed_property: "cycle", change_details: { cycle_id: cycleId } },
path: router.asPath,
routePath: router.asPath,
});
},
[workspaceSlug, issue, addCycleToIssue, removeCycleFromIssue, captureIssueEvent, router.asPath]

View File

@ -50,7 +50,7 @@ export const SpreadsheetModuleColumn: React.FC<Props> = observer((props) => {
element: "Spreadsheet layout",
},
updates: { changed_property: "module_ids", change_details: { module_ids: moduleIds } },
path: router.asPath,
routePath: router.asPath,
});
},
[workspaceSlug, issue, changeModulesInIssue, captureIssueEvent, router.asPath]

View File

@ -53,7 +53,7 @@ export const IssueColumn = observer((props: Props) => {
element: "Spreadsheet layout",
},
updates: updates,
path: router.asPath,
routePath: router.asPath,
});
})
}

View File

@ -183,14 +183,14 @@ export const SpreadsheetQuickAddIssueForm: React.FC<Props> = observer((props) =>
captureIssueEvent({
eventName: ISSUE_CREATED,
payload: { ...res, state: "SUCCESS", element: "Spreadsheet quick add" },
path: router.asPath,
routePath: router.asPath,
});
})
.catch((err) => {
captureIssueEvent({
eventName: ISSUE_CREATED,
payload: { ...payload, state: "FAILED", element: "Spreadsheet quick add" },
path: router.asPath,
routePath: router.asPath,
});
console.error(err);
});

View File

@ -98,7 +98,7 @@ export const DraftIssueLayout: React.FC<DraftIssueProps> = observer((props) => {
captureIssueEvent({
eventName: "Draft issue created",
payload: { ...res, state: "SUCCESS" },
path: router.asPath,
routePath: router.asPath,
});
onChange(null);
setIssueDiscardModal(false);
@ -113,7 +113,7 @@ export const DraftIssueLayout: React.FC<DraftIssueProps> = observer((props) => {
captureIssueEvent({
eventName: "Draft issue created",
payload: { ...payload, state: "FAILED" },
path: router.asPath,
routePath: router.asPath,
});
});
};

View File

@ -167,7 +167,7 @@ export const CreateUpdateIssueModal: React.FC<IssuesModalProps> = observer((prop
captureIssueEvent({
eventName: ISSUE_CREATED,
payload: { ...response, state: "SUCCESS" },
path: router.asPath,
routePath: router.asPath,
});
!createMore && handleClose();
if (createMore) issueTitleRef && issueTitleRef?.current?.focus();
@ -183,7 +183,7 @@ export const CreateUpdateIssueModal: React.FC<IssuesModalProps> = observer((prop
captureIssueEvent({
eventName: ISSUE_CREATED,
payload: { ...payload, state: "FAILED" },
path: router.asPath,
routePath: router.asPath,
});
}
};
@ -204,7 +204,7 @@ export const CreateUpdateIssueModal: React.FC<IssuesModalProps> = observer((prop
captureIssueEvent({
eventName: ISSUE_UPDATED,
payload: { ...payload, issueId: data.id, state: "SUCCESS" },
path: router.asPath,
routePath: router.asPath,
});
handleClose();
} catch (error) {
@ -216,7 +216,7 @@ export const CreateUpdateIssueModal: React.FC<IssuesModalProps> = observer((prop
captureIssueEvent({
eventName: ISSUE_UPDATED,
payload: { ...payload, state: "FAILED" },
path: router.asPath,
routePath: router.asPath,
});
}
};

View File

@ -95,14 +95,14 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
changed_property: Object.keys(data).join(","),
change_details: Object.values(data).join(","),
},
path: router.asPath,
routePath: router.asPath,
});
})
.catch(() => {
captureIssueEvent({
eventName: ISSUE_UPDATED,
payload: { state: "FAILED", element: "Issue peek-overview" },
path: router.asPath,
routePath: router.asPath,
});
setToast({
title: "Error!",
@ -122,7 +122,7 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
captureIssueEvent({
eventName: ISSUE_DELETED,
payload: { id: issueId, state: "SUCCESS", element: "Issue peek-overview" },
path: router.asPath,
routePath: router.asPath,
});
} catch (error) {
setToast({
@ -133,7 +133,7 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
captureIssueEvent({
eventName: ISSUE_DELETED,
payload: { id: issueId, state: "FAILED", element: "Issue peek-overview" },
path: router.asPath,
routePath: router.asPath,
});
}
},
@ -143,13 +143,13 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
captureIssueEvent({
eventName: ISSUE_ARCHIVED,
payload: { id: issueId, state: "SUCCESS", element: "Issue peek-overview" },
path: router.asPath,
routePath: router.asPath,
});
} catch (error) {
captureIssueEvent({
eventName: ISSUE_ARCHIVED,
payload: { id: issueId, state: "FAILED", element: "Issue peek-overview" },
path: router.asPath,
routePath: router.asPath,
});
}
},
@ -164,7 +164,7 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
captureIssueEvent({
eventName: ISSUE_RESTORED,
payload: { id: issueId, state: "SUCCESS", element: "Issue peek-overview" },
path: router.asPath,
routePath: router.asPath,
});
} catch (error) {
setToast({
@ -175,7 +175,7 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
captureIssueEvent({
eventName: ISSUE_RESTORED,
payload: { id: issueId, state: "FAILED", element: "Issue peek-overview" },
path: router.asPath,
routePath: router.asPath,
});
}
},
@ -190,7 +190,7 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
changed_property: "cycle_id",
change_details: cycleId,
},
path: router.asPath,
routePath: router.asPath,
});
} catch (error) {
setToast({
@ -205,7 +205,7 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
changed_property: "cycle_id",
change_details: cycleId,
},
path: router.asPath,
routePath: router.asPath,
});
}
},
@ -219,7 +219,7 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
changed_property: "cycle_id",
change_details: cycleId,
},
path: router.asPath,
routePath: router.asPath,
});
} catch (error) {
setToast({
@ -234,7 +234,7 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
changed_property: "cycle_id",
change_details: cycleId,
},
path: router.asPath,
routePath: router.asPath,
});
}
},
@ -260,7 +260,7 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
changed_property: "cycle_id",
change_details: "",
},
path: router.asPath,
routePath: router.asPath,
});
} catch (error) {
captureIssueEvent({
@ -270,7 +270,7 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
changed_property: "cycle_id",
change_details: "",
},
path: router.asPath,
routePath: router.asPath,
});
}
},
@ -284,7 +284,7 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
changed_property: "module_id",
change_details: moduleIds,
},
path: router.asPath,
routePath: router.asPath,
});
} catch (error) {
setToast({
@ -299,7 +299,7 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
changed_property: "module_id",
change_details: moduleIds,
},
path: router.asPath,
routePath: router.asPath,
});
}
},
@ -325,7 +325,7 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
changed_property: "module_id",
change_details: "",
},
path: router.asPath,
routePath: router.asPath,
});
} catch (error) {
captureIssueEvent({
@ -335,7 +335,7 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
changed_property: "module_id",
change_details: "",
},
path: router.asPath,
routePath: router.asPath,
});
}
},

View File

@ -185,7 +185,7 @@ export const SubIssuesRoot: FC<ISubIssuesRoot> = observer((props) => {
changed_property: Object.keys(issueData).join(","),
change_details: Object.values(issueData).join(","),
},
path: router.asPath,
routePath: router.asPath,
});
setToast({
type: TOAST_TYPE.SUCCESS,
@ -201,7 +201,7 @@ export const SubIssuesRoot: FC<ISubIssuesRoot> = observer((props) => {
changed_property: Object.keys(issueData).join(","),
change_details: Object.values(issueData).join(","),
},
path: router.asPath,
routePath: router.asPath,
});
setToast({
type: TOAST_TYPE.ERROR,
@ -226,7 +226,7 @@ export const SubIssuesRoot: FC<ISubIssuesRoot> = observer((props) => {
changed_property: "parent_id",
change_details: parentIssueId,
},
path: router.asPath,
routePath: router.asPath,
});
setSubIssueHelpers(parentIssueId, "issue_loader", issueId);
} catch (error) {
@ -237,7 +237,7 @@ export const SubIssuesRoot: FC<ISubIssuesRoot> = observer((props) => {
changed_property: "parent_id",
change_details: parentIssueId,
},
path: router.asPath,
routePath: router.asPath,
});
setToast({
type: TOAST_TYPE.ERROR,
@ -253,14 +253,14 @@ export const SubIssuesRoot: FC<ISubIssuesRoot> = observer((props) => {
captureIssueEvent({
eventName: "Sub-issue deleted",
payload: { id: issueId, state: "SUCCESS", element: "Issue detail page" },
path: router.asPath,
routePath: router.asPath,
});
setSubIssueHelpers(parentIssueId, "issue_loader", issueId);
} catch (error) {
captureIssueEvent({
eventName: "Sub-issue removed",
payload: { id: issueId, state: "FAILED", element: "Issue detail page" },
path: router.asPath,
routePath: router.asPath,
});
setToast({
type: TOAST_TYPE.ERROR,

View File

@ -2,7 +2,7 @@ export type IssueEventProps = {
eventName: string;
payload: any;
updates?: any;
path?: string;
routePath?: string;
};
export type EventProps = {
@ -77,7 +77,7 @@ export const getPageEventPayload = (payload: any) => ({
});
export const getIssueEventPayload = (props: IssueEventProps) => {
const { eventName, payload, updates, path } = props;
const { eventName, payload, updates, routePath } = props;
let eventPayload: any = {
issue_id: payload.id,
estimate_point: payload.estimate_point,
@ -102,26 +102,14 @@ export const getIssueEventPayload = (props: IssueEventProps) => {
module_id: payload.module_id,
archived_at: payload.archived_at,
state: payload.state,
view_id: path?.includes("workspace-views") || path?.includes("views") ? path.split("/").pop() : "",
view_id: routePath?.includes("workspace-views") || routePath?.includes("views") ? routePath.split("/").pop() : "",
};
if (eventName === ISSUE_UPDATED) {
eventPayload = {
...eventPayload,
...updates,
updated_from: props.path?.includes("workspace-views")
? "All views"
: props.path?.includes("cycles")
? "Cycle"
: props.path?.includes("modules")
? "Module"
: props.path?.includes("views")
? "Project view"
: props.path?.includes("inbox")
? "Inbox"
: props.path?.includes("draft")
? "Draft"
: "Project",
updated_from: elementFromPath(routePath),
};
}
return eventPayload;
@ -140,6 +128,26 @@ export const getProjectStateEventPayload = (payload: any) => ({
element: payload.element,
});
export const getIssuesListOpenedPayload = (payload: any) => ({
element: elementFromPath(payload.routePath),
type: payload.project_id ? "Project" : "Workspace",
layout: payload?.displayFilters?.layout,
filters: payload?.filters,
display_properties: payload?.displayProperties,
});
// Returns the element based on the path
const elementFromPath = (routePath?: string) => {
if (routePath?.includes("workspace-views")) return "Workspace view";
if (routePath?.includes("cycles")) return "Cycle";
if (routePath?.includes("modules")) return "Module";
if (routePath?.includes("views")) return "Project view";
if (routePath?.includes("inbox")) return "Inbox";
if (routePath?.includes("draft")) return "Draft";
if (routePath?.includes("archived")) return "Archive";
return "";
};
// Workspace crud Events
export const WORKSPACE_CREATED = "Workspace created";
export const WORKSPACE_UPDATED = "Workspace updated";
@ -169,6 +177,8 @@ export const ISSUE_UPDATED = "Issue updated";
export const ISSUE_DELETED = "Issue deleted";
export const ISSUE_ARCHIVED = "Issue archived";
export const ISSUE_RESTORED = "Issue restored";
// Issue Checkout Events
export const ISSUES_LIST_OPENED = "Issues list opened";
export const ISSUE_OPENED = "Issue opened";
// Project State Events
export const STATE_CREATED = "State created";