diff --git a/apps/app/components/core/calendar-view/calendar.tsx b/apps/app/components/core/calendar-view/calendar.tsx index 7dd84a0f8..dc93751d4 100644 --- a/apps/app/components/core/calendar-view/calendar.tsx +++ b/apps/app/components/core/calendar-view/calendar.tsx @@ -33,6 +33,7 @@ import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, + PlusIcon, } from "@heroicons/react/24/outline"; // services import issuesService from "services/issues.service"; @@ -49,12 +50,16 @@ import { IIssue } from "types"; import { monthOptions, yearOptions } from "constants/calendar"; import modulesService from "services/modules.service"; +type Props = { + addIssueToDate: (date: string) => void; +}; + interface ICalendarRange { startDate: Date; endDate: Date; } -export const CalendarView = () => { +export const CalendarView: React.FC = ({ addIssueToDate }) => { const [showWeekEnds, setShowWeekEnds] = useState(false); const [currentDate, setCurrentDate] = useState(new Date()); const [isMonthlyView, setIsMonthlyView] = useState(true); @@ -231,7 +236,7 @@ export const CalendarView = () => { isSameYear(year.value, currentDate) ? "text-sm font-medium text-gray-800" : "text-xs text-gray-400 " - } hover:text-sm hover:text-gray-800 hover:font-medium `} + } hover:text-sm hover:text-gray-800 hover:font-medium`} > {year.label} @@ -424,7 +429,7 @@ export const CalendarView = () => { key={index} ref={provided.innerRef} {...provided.droppableProps} - className={`flex flex-col gap-1.5 border-t border-brand-base p-2.5 text-left text-sm font-medium hover:bg-brand-surface-1 ${ + className={`group flex flex-col gap-1.5 border-t border-brand-base p-2.5 text-left text-sm font-medium hover:bg-brand-surface-1 ${ showWeekEnds ? (index + 1) % 7 === 0 ? "" @@ -458,6 +463,15 @@ export const CalendarView = () => { )} ))} +
+ +
{provided.placeholder} )} diff --git a/apps/app/components/core/issues-view.tsx b/apps/app/components/core/issues-view.tsx index 18e685866..6c80945c9 100644 --- a/apps/app/components/core/issues-view.tsx +++ b/apps/app/components/core/issues-view.tsx @@ -280,6 +280,17 @@ export const IssuesView: React.FC = ({ [setCreateIssueModal, setPreloadedData, selectedGroup] ); + const addIssueToDate = useCallback( + (date: string) => { + setCreateIssueModal(true); + setPreloadedData({ + target_date: date, + actionType: "createIssue", + }); + }, + [setCreateIssueModal, setPreloadedData] + ); + const makeIssueCopy = useCallback( (issue: IIssue) => { setCreateIssueModal(true); @@ -389,7 +400,7 @@ export const IssuesView: React.FC = ({ <>
@@ -481,7 +492,7 @@ export const IssuesView: React.FC = ({ userAuth={memberRole} /> ) : ( - + )} ) : type === "issue" ? (