Skip to content

Commit e18e664

Browse files
authored
Merge pull request #66 from cortex-reply/fix/minor-issues
fix: applies minor fixes
2 parents a0b6fb4 + d492797 commit e18e664

4 files changed

Lines changed: 14 additions & 9 deletions

File tree

src/components/Projects/AddEpicModal.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { Epic } from '../Foundary/types'
2222
interface AddEpicModalProps {
2323
isOpen: boolean
2424
onClose: () => void
25-
onAddEpic: (epic: Omit<Epic, 'id'>) => void
25+
onAddEpic: (epic: Omit<Epic, 'id' | 'updatedAt' | 'createdAt'>) => void
2626
}
2727

2828
export const AddEpicModal: React.FC<AddEpicModalProps> = ({ isOpen, onClose, onAddEpic }) => {
@@ -73,8 +73,8 @@ export const AddEpicModal: React.FC<AddEpicModalProps> = ({ isOpen, onClose, onA
7373
phase: formData.phase,
7474
startDate: formData.startDate,
7575
endDate: formData.endDate,
76-
createdAt: new Date().toISOString(),
77-
updatedAt: new Date().toISOString(),
76+
// createdAt: new Date().toISOString(),
77+
// updatedAt: new Date().toISOString(),
7878
// progress: formData.progress,
7979
// isSelected: true,
8080
})

src/components/Projects/EpicsView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ interface EpicsViewProps {
2020
onUpdateTask: (taskId: string, updates: Partial<Task>) => void
2121
onTaskClick: (task: Task) => void
2222
onAddTaskToEpic: (task: Omit<Task, 'id' | 'updatedAt' | 'createdAt'>) => void
23-
onAddEpic: () => void
23+
onAddEpic: (epic: Omit<Epic, 'id' | 'updatedAt' | 'createdAt'>) => void
2424
onUpdateEpic: (epicId: string, updates: Partial<Epic>) => void
2525
onDeleteEpic: (epicId: string) => void
2626
}

src/components/Projects/KanbanBoardView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export interface KanbanBoardProps {
2525
onDeleteTask?: (taskId: string) => void
2626
onTaskClick?: (task: Task) => void
2727
// Epic handlers
28-
onAddEpic?: (newEpic: Omit<Epic, 'id'>) => void
28+
onAddEpic?: (newEpic: Omit<Epic, 'id' | 'updatedAt' | 'createdAt'>) => void
2929
onAddComment?: ({ content, taskId }: { taskId: string; content: string }) => Promise<Task>
3030
}
3131

@@ -194,7 +194,7 @@ export const KanbanBoardView: React.FC<KanbanBoardProps> = ({
194194
}
195195
}
196196

197-
const handleAddEpic = (newEpic: Omit<Epic, 'id'>) => {
197+
const handleAddEpic = (newEpic: Omit<Epic, 'id' | 'updatedAt' | 'createdAt'>) => {
198198
const epic: Epic = {
199199
...newEpic,
200200
id: Date.now(),

src/components/Projects/ProjectView.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ interface Props {
9191
onDeleteTask?: (taskId: string) => void
9292
onTaskClick?: (task: Task) => void
9393
// Epic handlers
94-
onAddEpic?: (newEpic: Omit<Epic, 'id' | 'createdAt'>) => void
94+
onAddEpic?: (epic: Omit<Epic, 'id' | 'updatedAt' | 'createdAt'>) => void
9595
onUpdateEpic?: (epicId: string, updates: Partial<Epic>) => void
9696
onDeleteEpic?: (epicId: string) => void
9797
onAddTaskToEpic?: (epicId: string) => void
@@ -324,8 +324,13 @@ export default function ProjectView({
324324
onDeleteProject?.(projectId)
325325
}
326326

327-
const handleAddEpic = (newEpic: Omit<Epic, 'id'>) => {
328-
const epic: Epic = { ...newEpic, id: Date.now() }
327+
const handleAddEpic = (newEpic: Omit<Epic, 'id' | 'updatedAt' | 'createdAt'>) => {
328+
const epic: Epic = {
329+
...newEpic,
330+
id: Date.now(),
331+
createdAt: new Date().toISOString(),
332+
updatedAt: new Date().toISOString(),
333+
}
329334
setEpics((prev) => [...prev, epic])
330335
onAddEpic?.({ ...epic })
331336
}

0 commit comments

Comments
 (0)