Skip to content

Commit 252a3f9

Browse files
authored
Merge pull request #61 from cortex-reply/fix/epics
fix: applies fix on epic view
2 parents c3a0743 + 6d7ace8 commit 252a3f9

4 files changed

Lines changed: 275 additions & 237 deletions

File tree

src/components/Projects/AddEpicModal.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ export const AddEpicModal: React.FC<AddEpicModalProps> = ({ isOpen, onClose, onA
8484
color: 'bg-blue-500',
8585
confidence: 'medium',
8686
phase: 1,
87-
startDate: new Date().toISOString().split('T')[0],
88-
endDate: new Date().toISOString().split('T')[0],
87+
startDate: new Date().toISOString(),
88+
endDate: new Date().toISOString(),
8989
progress: 0,
9090
})
9191
onClose()
@@ -204,7 +204,7 @@ export const AddEpicModal: React.FC<AddEpicModalProps> = ({ isOpen, onClose, onA
204204
</div>
205205
</div>
206206

207-
<div className="space-y-2">
207+
{/* <div className="space-y-2">
208208
<Label>Progress (%)</Label>
209209
<Input
210210
type="number"
@@ -213,7 +213,7 @@ export const AddEpicModal: React.FC<AddEpicModalProps> = ({ isOpen, onClose, onA
213213
value={formData.progress}
214214
onChange={(e) => handleChange('progress', parseInt(e.target.value) || 0)}
215215
/>
216-
</div>
216+
</div> */}
217217

218218
<DialogFooter>
219219
<Button type="button" variant="outline" onClick={onClose}>

src/components/Projects/AddTaskModal.tsx

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@ export const AddTaskModal: React.FC<AddTaskModalProps> = ({
6666
priority: 'medium' as Task['priority'],
6767
type: 'story' as Task['type'],
6868
storyPoints: 1,
69-
epicId: '',
70-
sprintId: 'none',
69+
epic: '',
70+
sprint: 'none',
7171
assignee: '',
7272
})
7373

7474
// Effect to set the default epic when modal opens
7575
useEffect(() => {
7676
if (isOpen && defaultEpicId) {
77-
setFormData((prev) => ({ ...prev, epicId: defaultEpicId }))
77+
setFormData((prev) => ({ ...prev, epic: defaultEpicId }))
7878
}
7979
}, [isOpen, defaultEpicId])
8080

@@ -88,8 +88,8 @@ export const AddTaskModal: React.FC<AddTaskModalProps> = ({
8888
priority: 'medium',
8989
type: 'story',
9090
storyPoints: 1,
91-
epicId: defaultEpicId || '',
92-
sprintId: 'none',
91+
epic: defaultEpicId || '',
92+
sprint: 'none',
9393
assignee: '',
9494
})
9595
}
@@ -105,8 +105,8 @@ export const AddTaskModal: React.FC<AddTaskModalProps> = ({
105105
priority: formData.priority as Task['priority'],
106106
type: formData.type as Task['type'],
107107
storyPoints: formData.storyPoints,
108-
epic: Number(formData.epicId),
109-
sprint: Number(formData.sprintId),
108+
epic: Number(formData.epic),
109+
sprint: Number(formData.sprint),
110110
assignee: formData.assignee.trim()
111111
? { relationTo: 'digital-colleagues', value: Number(formData.assignee) }
112112
: null,
@@ -120,8 +120,8 @@ export const AddTaskModal: React.FC<AddTaskModalProps> = ({
120120
priority: 'medium',
121121
type: 'story',
122122
storyPoints: 1,
123-
epicId: defaultEpicId || '',
124-
sprintId: 'none',
123+
epic: defaultEpicId || '',
124+
sprint: '',
125125
assignee: '',
126126
})
127127
onClose()
@@ -225,10 +225,7 @@ export const AddTaskModal: React.FC<AddTaskModalProps> = ({
225225
{!defaultEpicId && (
226226
<div className="space-y-2">
227227
<Label htmlFor="epic">Epic</Label>
228-
<Select
229-
value={formData.epicId}
230-
onValueChange={(value) => handleChange('epicId', value)}
231-
>
228+
<Select value={formData.epic} onValueChange={(value) => handleChange('epic', value)}>
232229
<SelectTrigger>
233230
<SelectValue placeholder="Select an epic" />
234231
</SelectTrigger>
@@ -250,8 +247,8 @@ export const AddTaskModal: React.FC<AddTaskModalProps> = ({
250247
<div className="space-y-2">
251248
<Label htmlFor="sprint">Sprint (Optional)</Label>
252249
<Select
253-
value={formData.sprintId}
254-
onValueChange={(value) => handleChange('sprintId', value)}
250+
value={formData.sprint}
251+
onValueChange={(value) => handleChange('sprint', value)}
255252
>
256253
<SelectTrigger>
257254
<SelectValue placeholder="Select a sprint" />

0 commit comments

Comments
 (0)