Skip to content

Commit e40d35f

Browse files
committed
feat: dc fixes
1 parent 6438843 commit e40d35f

9 files changed

Lines changed: 474 additions & 290 deletions

File tree

src/components/AdvancedComponents/AppSidebar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,10 +293,10 @@ export function AppSidebar({
293293

294294
<div className="p-3">
295295
<div className="space-y-1">
296-
<button className="flex w-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium hover:bg-muted">
296+
<Link href="/admin" className="flex w-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium hover:bg-muted">
297297
<Settings className="h-5 w-5" />
298298
<span>Settings</span>
299-
</button>
299+
</Link>
300300
</div>
301301
</div>
302302

src/components/AdvancedComponents/EditableField.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,14 @@ export const EditableField: React.FC<EditableFieldProps> = ({
8080
<div
8181
onClick={handleFieldClick}
8282
className={`${disabled ? 'cursor-not-allowed opacity-50' : 'cursor-pointer'} hover:bg-muted/50 p-2 rounded border border-transparent hover:border-border transition-colors group ${
83-
multiline ? "min-h-[100px]" : "min-h-[40px]"
84-
} flex items-start gap-2`}
83+
multiline ? "min-h-[100px] max-h-[300px]" : "min-h-[40px]"
84+
} flex items-start gap-2 overflow-hidden`}
8585
>
86-
<span className={multiline ? "text-sm text-muted-foreground" : "text-lg font-medium text-foreground"}>
86+
<span className={`${multiline ? "text-sm text-muted-foreground max-h-[280px] overflow-y-auto break-words" : "text-lg font-medium text-foreground"} flex-1 whitespace-pre-wrap break-words`}>
8787
{value || "Click to edit..."}
8888
</span>
8989
{!disabled && (
90-
<Edit className="h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity" />
90+
<Edit className="h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity flex-shrink-0" />
9191
)}
9292
</div>
9393
)}

src/components/Projects/AddTaskModal.stories.tsx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,32 @@ const mockSprints = [
9797
},
9898
];
9999

100+
const mockAssignees = [
101+
{
102+
id: 1,
103+
name: 'John Doe',
104+
email: 'john@example.com',
105+
},
106+
{
107+
id: 2,
108+
name: 'Jane Smith',
109+
email: 'jane@example.com',
110+
},
111+
{
112+
id: 3,
113+
name: 'Bob Johnson',
114+
email: 'bob@example.com',
115+
},
116+
];
117+
100118
export const Default: Story = {
101119
args: {
102120
isOpen: true,
103121
onClose: action('onClose'),
104122
onAddTask: action('onAddTask'),
105123
epics: mockEpics,
106124
sprints: mockSprints,
125+
assignees: mockAssignees,
107126
},
108127
};
109128

@@ -114,6 +133,7 @@ export const Closed: Story = {
114133
onAddTask: action('onAddTask'),
115134
epics: mockEpics,
116135
sprints: mockSprints,
136+
assignees: mockAssignees,
117137
},
118138
};
119139

@@ -124,5 +144,6 @@ export const NoEpics: Story = {
124144
onAddTask: action('onAddTask'),
125145
epics: [],
126146
sprints: mockSprints,
147+
assignees: mockAssignees,
127148
},
128149
};

src/components/Projects/AddTaskModal.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ export const AddTaskModal: React.FC<AddTaskModalProps> = ({
9898
const handleSubmit = (e: React.FormEvent) => {
9999
e.preventDefault()
100100
if (formData.name.trim()) {
101+
const sprintValue = formData.sprint === 'none' ? null : Number(formData.sprint)
102+
const assigneeValue = formData.assignee === 'none' || !formData.assignee.trim()
103+
? null
104+
: { relationTo: 'digital-colleagues' as const, value: Number(formData.assignee) }
105+
101106
onAddTask({
102107
name: formData.name.trim(),
103108
description: formData.description.trim(),
@@ -106,10 +111,8 @@ export const AddTaskModal: React.FC<AddTaskModalProps> = ({
106111
type: formData.type as Task['type'],
107112
storyPoints: formData.storyPoints,
108113
epic: Number(formData.epic),
109-
sprint: Number(formData.sprint),
110-
assignee: formData.assignee.trim()
111-
? { relationTo: 'digital-colleagues', value: Number(formData.assignee) }
112-
: null,
114+
sprint: sprintValue,
115+
assignee: assigneeValue,
113116
dateLogged: new Date().toISOString(),
114117
index: 0,
115118
})
@@ -121,7 +124,7 @@ export const AddTaskModal: React.FC<AddTaskModalProps> = ({
121124
type: 'story',
122125
storyPoints: 1,
123126
epic: defaultEpicId || '',
124-
sprint: '',
127+
sprint: 'none',
125128
assignee: '',
126129
})
127130
onClose()

0 commit comments

Comments
 (0)