[Maintenance] - Allow Deletion of Future Events
Maintainer thường phản hồi trong vòng 3 ngày
@deepikarul đang làm issue này rồi.
Từ ngày 6/10/2026.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 68/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
Hướng nghiên cứu
Bắt đầu với DeleteSeriesConfirmationModal.tsx và luồng deleteScheduleSlot hiện có, sau đó lần theo CalendarWeekView.tsx, CalendarDayView.tsx, EventClickPopup.tsx, calendar.routes.ts, CalendarController.ts và CalendarService.ts. Hãy lần theo các điểm vào API, mutation và service đã nêu; công việc được xem là hoàn tất khi modal cung cấp các lần xuất hiện trong tương lai, endpoint xóa các slot đáp ứng điều kiện và các view bị ảnh hưởng dùng chung phần xử lý xóa khi phù hợp.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
Currently you can either delete a single instance of a recurring schedule slot or all instances of the recurring schedule slot (aka, delete the entire event). The request is to add a third option to delete all future scheduled slots of that event.
Acceptance Criteria
- Add a third option: "All future occurrences (X slots)"
- Create the API endpoint that deletes any future schedule slots
- BONUS:
CalendarWeekView.tsxandCalendarDayView.tsxboth have this function (alsoEventClickPopup.tsx):
const handleSeriesDeleteConfirm = async (deleteEntireEvent: boolean) => {
try {
setShowSeriesDeleteModal(false);
setLockedTooltipEventId(null);
if (deleteEntireEvent) {
await deleteEvent();
toast.success('Event deleted successfully!');
} else {
await deleteScheduleSlot();
toast.success('Event occurrence deleted successfully!');
}
} catch (err) {
if (err instanceof Error) toast.error(err.message);
}
};
- If possible, please merge these all into one shared function from a helper file
Proposed Solution
- Start by removing the logic that is currently in place. As it stands right now, there is a boolean: either all events, or one event. You must turn this into an Enum instead where it is either all events, future events, or the one event. For this you must reformat
setDeleteEntireEventwithinDeleteSeriesConfirmationModal.tsxwith a new name and for it must take that Enum as its state. - Add the new
FormControlLabelbelow the other options - Create the mutation similar to the one below: (name it useDeleteFutureScheduleSlots
export const useDeleteScheduleSlot = (eventId: string, scheduleSlotId: string) => {
const queryClient = useQueryClient();
return useMutation<Event, Error>(
['events', 'delete-schedule-slot', eventId, scheduleSlotId],
async () => {
const { data } = await postDeleteScheduleSlot(eventId, scheduleSlotId);
return data;
},
{
onSuccess: () => {
queryClient.invalidateQueries(['filter-events']);
queryClient.invalidateQueries(EVENT_KEY);
queryClient.invalidateQueries(['events', eventId]);
}
}
);
};
- Create the axios post similar to: (name it postDeleteFutureScheduleSlots)
export const postDeleteScheduleSlot = async (eventId: string, scheduleSlotId: string) => {
return axios.post<Event>(
apiUrls.calendarDeleteScheduleSlot(eventId, scheduleSlotId),
{},
{
transformResponse: (data) => eventTransformer(JSON.parse(data))
}
);
};
- Make a new route in
calendar.routes.tssimilar to this:
calendarRouter.post('/event/:eventId/schedule-slot/:scheduleSlotId/delete', CalendarController.deleteScheduleSlot);
- Make a new function in
CalendarController.tsnamed deleteFutureScheduleSlots - Make a function in
CalendarService.tsalso named deleteFutureScheduleSlots - It may be very helpful to follow
deleteScheduleSlotincalendar.service.ts - Do a prisma call to find all schedule slots after a "selectedDate" (gte stands for Greater Than or Equal to ensure that you also delete the current one seleted as well)
const scheduleSlots = await prisma.schedule_Slot.findMany({
where: {
startTime: {
gte: selectedDate
}
}
});
- Follow the rest of the logic that happens in
deleteScheduleSlotwithincalendar.service.ts.
Mocks
- Ngôn ngữ chính
- TypeScript
- Star
- 39
- Fork
- 10
- Merge trung bình
- 3 ngày 18 giờ
- Pull request đã merge (30 ngày)
- 43
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Northeastern-Electric-Racing/FinishLine
-
Reem Alsheikh-Ali - CreditsĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 70/100
Northeastern-Electric-Racing/FinishLine#4664 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Northeastern-Electric-Racing/FinishLine#4660 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Northeastern-Electric-Racing/FinishLine#4659 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
Northeastern-Electric-Racing/FinishLine#4647 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
Northeastern-Electric-Racing/FinishLine#4646 ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của Northeastern-Electric-Racing/FinishLine
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
oxidecomputer/skepsis#102 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
voidzero-dev/void#677 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
kunchenguid/gh-axi#247 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
lidge-jun/opencodex#8101 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày