11
22import type { Meta , StoryObj } from '@storybook/react' ;
33import { TaskDetailsModal } from './TaskDetailsModal' ;
4+ import { DigitalColleague , User } from '../Foundary/types' ;
45
56const meta : Meta < typeof TaskDetailsModal > = {
67 title : 'Projects/Tasks/TaskDetailsModal' ,
@@ -104,6 +105,77 @@ const mockSprints = [
104105 } ,
105106] ;
106107
108+ const mockTeamMembers : ( User | DigitalColleague ) [ ] = [
109+ // Digital Colleagues
110+ {
111+ id : 1 ,
112+ name : 'HR Business Partner' ,
113+ model : null ,
114+ capabilities : [ ] ,
115+ knowledge : null ,
116+ coreKnowledge : null ,
117+ description : null ,
118+ jobDescription : null ,
119+ workInstructions : null ,
120+ capabilityLevel : 1 ,
121+ systemMsg : null ,
122+ identity : 1 ,
123+ metadata : null ,
124+ updatedAt : '2025-11-20T19:16:27.180Z' ,
125+ createdAt : '2025-11-20T19:15:06.620Z' ,
126+ } ,
127+ {
128+ id : 2 ,
129+ name : 'Technical Support Bot' ,
130+ model : null ,
131+ capabilities : [ ] ,
132+ knowledge : null ,
133+ coreKnowledge : null ,
134+ description : null ,
135+ jobDescription : null ,
136+ workInstructions : null ,
137+ capabilityLevel : 2 ,
138+ systemMsg : null ,
139+ identity : 2 ,
140+ metadata : null ,
141+ updatedAt : '2025-11-20T19:16:27.180Z' ,
142+ createdAt : '2025-11-20T19:15:06.620Z' ,
143+ } ,
144+ // Users
145+ {
146+ id : '99ccf092-f9a0-4325-9343-58ebe4d5eb04' ,
147+ email : 'rob.ellison@example.com' ,
148+ emailVerified : null ,
149+ name : 'Rob Ellison' ,
150+ image : null ,
151+ role : 'user' ,
152+ enabled : true ,
153+ accounts : [ ] ,
154+ sessions : [ ] ,
155+ updatedAt : '2026-02-16T23:47:00.735Z' ,
156+ createdAt : '2025-12-15T16:52:22.363Z' ,
157+ enableAPIKey : null ,
158+ apiKey : null ,
159+ collection : 'users' ,
160+ } ,
161+ {
162+ id : 'a1b2c3d4-e5f6-4g5h-6i7j-8k9l0m1n2o3p' ,
163+ email : 'sarah.johnson@example.com' ,
164+ emailVerified : null ,
165+ name : 'Sarah Johnson' ,
166+ image : null ,
167+ role : 'user' ,
168+ enabled : true ,
169+ accounts : [ ] ,
170+ sessions : [ ] ,
171+ updatedAt : '2026-02-16T23:47:00.735Z' ,
172+ createdAt : '2025-12-15T16:52:22.363Z' ,
173+ enableAPIKey : null ,
174+ apiKey : null ,
175+ collection : 'users' ,
176+ } ,
177+ ] ;
178+
107179export const Default : Story = {
108180 args : {
109181 isOpen : true ,
@@ -122,7 +194,7 @@ export const Default: Story = {
122194 } ,
123195 epics : mockEpics ,
124196 sprints : mockSprints ,
125- colleagues : [ ] ,
197+ colleagues : mockTeamMembers ,
126198 onClose : ( ) => { } ,
127199 onUpdateTask : mockUpdateTask ,
128200 onDeleteTask : mockDeleteTask ,
@@ -147,7 +219,7 @@ export const WithLoadingStates: Story = {
147219 } ,
148220 epics : mockEpics ,
149221 sprints : mockSprints ,
150- colleagues : [ ] ,
222+ colleagues : mockTeamMembers ,
151223 onClose : ( ) => { } ,
152224 onUpdateTask : mockUpdateTask ,
153225 onDeleteTask : mockDeleteTask ,
@@ -172,7 +244,7 @@ export const WithErrorStates: Story = {
172244 } ,
173245 epics : mockEpics ,
174246 sprints : mockSprints ,
175- colleagues : [ ] ,
247+ colleagues : mockTeamMembers ,
176248 onClose : ( ) => { } ,
177249 onUpdateTask : mockUpdateTaskFail ,
178250 onDeleteTask : mockDeleteTaskFail ,
@@ -197,7 +269,7 @@ export const BugTask: Story = {
197269 } ,
198270 epics : mockEpics ,
199271 sprints : mockSprints ,
200- colleagues : [ ] ,
272+ colleagues : mockTeamMembers ,
201273 onClose : ( ) => { } ,
202274 onUpdateTask : mockUpdateTask ,
203275 onDeleteTask : mockDeleteTask ,
@@ -222,7 +294,7 @@ export const CompletedTask: Story = {
222294 } ,
223295 epics : mockEpics ,
224296 sprints : mockSprints ,
225- colleagues : [ ] ,
297+ colleagues : mockTeamMembers ,
226298 onClose : ( ) => { } ,
227299 onUpdateTask : mockUpdateTask ,
228300 onDeleteTask : mockDeleteTask ,
@@ -247,7 +319,7 @@ export const SpikeTask: Story = {
247319 } ,
248320 epics : mockEpics ,
249321 sprints : mockSprints ,
250- colleagues : [ ] ,
322+ colleagues : mockTeamMembers ,
251323 onClose : ( ) => { } ,
252324 onUpdateTask : mockUpdateTask ,
253325 onDeleteTask : mockDeleteTask ,
@@ -272,7 +344,7 @@ export const NoSprint: Story = {
272344 } ,
273345 epics : mockEpics ,
274346 sprints : mockSprints ,
275- colleagues : [ ] ,
347+ colleagues : mockTeamMembers ,
276348 onClose : ( ) => { } ,
277349 onUpdateTask : mockUpdateTask ,
278350 onDeleteTask : mockDeleteTask ,
@@ -297,7 +369,7 @@ export const LongDescription: Story = {
297369 } ,
298370 epics : mockEpics ,
299371 sprints : mockSprints ,
300- colleagues : [ ] ,
372+ colleagues : mockTeamMembers ,
301373 onClose : ( ) => { } ,
302374 onUpdateTask : mockUpdateTask ,
303375 onDeleteTask : mockDeleteTask ,
@@ -335,7 +407,7 @@ This refactoring is critical for improving our security posture, meeting complia
335407 } ,
336408 epics : mockEpics ,
337409 sprints : mockSprints ,
338- colleagues : [ ] ,
410+ colleagues : mockTeamMembers ,
339411 onClose : ( ) => { } ,
340412 onUpdateTask : mockUpdateTask ,
341413 onDeleteTask : mockDeleteTask ,
@@ -377,7 +449,7 @@ Integrate with current user preference system.`,
377449 } ,
378450 epics : mockEpics ,
379451 sprints : mockSprints ,
380- colleagues : [ ] ,
452+ colleagues : mockTeamMembers ,
381453 onClose : ( ) => { } ,
382454 onUpdateTask : mockUpdateTask ,
383455 onDeleteTask : mockDeleteTask ,
0 commit comments