-
-
- {
- setIsOpen(false);
- onChange(null);
- setSelectedDate(null);
- }}
- className="w-full"
- >
- Clear
-
- {
- if (!selectedDate) onChange(null);
- else onChange(renderDateFormat(selectedDate));
- setIsOpen(false);
- }}
- type="button"
- className="w-full"
- >
- Apply
-
-
-
-
-
- >
- );
-};
diff --git a/web/components/web-view/index.ts b/web/components/web-view/index.ts
deleted file mode 100644
index 114891095..000000000
--- a/web/components/web-view/index.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-export * from "./web-view-modal";
-export * from "./select-state";
-export * from "./select-priority";
-export * from "./issue-web-view-form";
-export * from "./label";
-export * from "./sub-issues";
-export * from "./issue-attachments";
-export * from "./issue-properties-detail";
-export * from "./issue-link-list";
-export * from "./create-update-link-form";
-export * from "./issue-activity";
-export * from "./select-assignee";
-export * from "./select-estimate";
-export * from "./add-comment";
-export * from "./select-parent";
-export * from "./select-blocker-to";
-export * from "./select-blocked-by";
-export * from "./activity-message";
-export * from "./issues-select-bottom-sheet";
-export * from "./select-relates-to";
-export * from "./select-duplicate";
-export * from "./spinner";
-export * from "./select-module";
-export * from "./select-cycle";
-export * from "./confirm-delete";
-export * from "./comment-card";
-export * from "./date-selector";
diff --git a/web/components/web-view/issue-activity.tsx b/web/components/web-view/issue-activity.tsx
deleted file mode 100644
index fcb402ebb..000000000
--- a/web/components/web-view/issue-activity.tsx
+++ /dev/null
@@ -1,206 +0,0 @@
-// react
-import React from "react";
-import { useRouter } from "next/router";
-import useSWR, { mutate } from "swr";
-
-// fetch key
-import { PROJECT_ISSUES_ACTIVITY } from "constants/fetch-keys";
-// services
-import { IssueService, IssueCommentService } from "services/issue";
-// hooks
-import useUser from "hooks/use-user";
-// components
-import { Label, AddComment, ActivityMessage, ActivityIcon, CommentCard } from "components/web-view";
-// helpers
-import { timeAgo } from "helpers/date-time.helper";
-// ui
-import { History } from "lucide-react";
-// types
-import type { IIssue, IIssueComment } from "types";
-
-type Props = {
- allowed: boolean;
- issueDetails: IIssue;
-};
-
-// services
-const issueService = new IssueService();
-const issueCommentService = new IssueCommentService();
-
-export const IssueActivity: React.FC = (props) => {
- const { issueDetails, allowed } = props;
-
- const router = useRouter();
- const { workspaceSlug, projectId, issueId } = router.query;
-
- const { user } = useUser();
-
- const { data: issueActivities, mutate: mutateIssueActivity } = useSWR(
- workspaceSlug && projectId && issueId ? PROJECT_ISSUES_ACTIVITY(issueId.toString()) : null,
- workspaceSlug && projectId && issueId
- ? () => issueService.getIssueActivities(workspaceSlug.toString(), projectId.toString(), issueId.toString())
- : null
- );
-
- const handleCommentUpdate = async (comment: any, formData: any) => {
- if (!workspaceSlug || !projectId || !issueId || !allowed) return;
-
- await issueCommentService
- .patchIssueComment(workspaceSlug as string, projectId as string, issueId as string, comment, formData, user)
- .then(() => mutateIssueActivity())
- .catch(() =>
- console.log(
- "toast",
- JSON.stringify({
- type: "error",
- message: "Comment could not be updated. Please try again.",
- })
- )
- );
- };
-
- const handleCommentDelete = async (commentId: string) => {
- if (!workspaceSlug || !projectId || !issueId || !allowed) return;
-
- mutateIssueActivity((prevData: any) => prevData?.filter((p: any) => p.id !== commentId), false);
-
- await issueCommentService
- .deleteIssueComment(workspaceSlug as string, projectId as string, issueId as string, commentId, user)
- .then(() => mutateIssueActivity())
- .catch(() =>
- console.log(
- "toast",
- JSON.stringify({
- type: "error",
- message: "Comment could not be deleted. Please try again.",
- })
- )
- );
- };
-
- const handleAddComment = async (formData: IIssueComment) => {
- if (!workspaceSlug || !issueDetails || !allowed) return;
-
- await issueCommentService
- .createIssueComment(workspaceSlug.toString(), issueDetails.project, issueDetails.id, formData, user)
- .then(() => {
- mutate(PROJECT_ISSUES_ACTIVITY(issueDetails.id));
- })
- .catch(() =>
- console.log(
- "toast",
- JSON.stringify({
- type: "error",
- message: "Comment could not be posted. Please try again.",
- })
- )
- );
- };
-
- return (
-
-
-
-
- {issueActivities?.map((activityItem, index) => {
- // determines what type of action is performed
- const message = activityItem.field ? : "created the issue.";
-
- if ("field" in activityItem && activityItem.field !== "updated_by") {
- return (
-