From db0b135787495596fde3c5f0da48c450a4f98788 Mon Sep 17 00:00:00 2001 From: Nevo David Date: Thu, 31 Jul 2025 00:37:58 +0700 Subject: [PATCH] feat: moving item with interval --- .../src/components/launches/calendar.tsx | 22 +++++-------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/apps/frontend/src/components/launches/calendar.tsx b/apps/frontend/src/components/launches/calendar.tsx index b3f708c7..92f5f96d 100644 --- a/apps/frontend/src/components/launches/calendar.tsx +++ b/apps/frontend/src/components/launches/calendar.tsx @@ -420,6 +420,10 @@ export const CalendarColumn: FC<{ }), }); if (status !== 500) { + if(item.interval) { + reloadCalendarView(); + return ; + } changeDate(item.id, getDate); return; } @@ -435,23 +439,6 @@ export const CalendarColumn: FC<{ canDrop: isBeforeNow ? false : !!monitor.canDrop() && !!monitor.isOver(), }), })); - const getIntegration = useCallback( - async ( - post: Post & { - integration: Integration; - } - ) => { - return ( - await fetch( - `/integrations/${post.integration.id}?order=${post.submittedForOrderId}`, - { - method: 'GET', - } - ) - ).json(); - }, - [] - ); const editPost = useCallback( ( @@ -830,6 +817,7 @@ const CalendarItem: FC<{ type: 'post', item: { id: post.id, + interval: !!post.intervalInDays, date, }, collect: (monitor) => ({