diff --git a/backend/routers/assets.py b/backend/routers/assets.py index 5475fd0..f2f5ecf 100644 --- a/backend/routers/assets.py +++ b/backend/routers/assets.py @@ -474,10 +474,19 @@ async def get_asset( # This avoids a separate COUNT query active_tasks = [task for task in asset.tasks if task.deleted_at is None] task_count = len(active_tasks) - + asset_data = AssetResponse.model_validate(asset) asset_data.task_count = task_count - + asset_data.task_details = [ + TaskStatusInfo( + task_type=task.task_type, + status=task.status, + task_id=task.id, + assigned_user_id=task.assigned_user_id + ) + for task in active_tasks + ] + return asset_data diff --git a/backend/schemas/asset.py b/backend/schemas/asset.py index 5f4f466..cbb0157 100644 --- a/backend/schemas/asset.py +++ b/backend/schemas/asset.py @@ -25,19 +25,6 @@ class AssetUpdate(BaseModel): status: Optional[AssetStatus] = None -class AssetResponse(AssetBase): - id: int - project_id: int - created_at: datetime - updated_at: datetime - - # Summary information - task_count: int = 0 - - class Config: - from_attributes = True - - class TaskStatusInfo(BaseModel): task_type: str # Changed from TaskType enum to str to support custom task types status: str # Changed from TaskStatus enum to str to support custom statuses @@ -45,6 +32,20 @@ class TaskStatusInfo(BaseModel): assigned_user_id: Optional[int] = None +class AssetResponse(AssetBase): + id: int + project_id: int + created_at: datetime + updated_at: datetime + + # Summary information + task_count: int = 0 + task_details: List[TaskStatusInfo] = Field(default_factory=list, description="Detailed task information") + + class Config: + from_attributes = True + + class AssetListResponse(BaseModel): id: int name: str diff --git a/frontend/src/components/project/ProjectMembersManager.vue b/frontend/src/components/project/ProjectMembersManager.vue deleted file mode 100644 index 5d465bb..0000000 --- a/frontend/src/components/project/ProjectMembersManager.vue +++ /dev/null @@ -1,323 +0,0 @@ - - - - - - Add Team Member - - - - - - - - - - {{ user.first_name }} {{ user.last_name }} ({{ user.email }}) - - - - - - - - - - No Department - Layout - Animation - Lighting - Composite - Modeling - Rigging - Surfacing - - - - - - Add - - - - - - - - - - - Current Members ({{ members.length }}) - - - - - - - - Loading members... - - - - - - - - - - - - - {{ member.user_first_name }} {{ member.user_last_name }} - - - {{ member.user_email }} - - - - - - updateMemberRole(member, value)" - > - - - - - No Department - Layout - Animation - Lighting - Composite - Modeling - Rigging - Surfacing - - - - - - - - - - - - - - - No members assigned to this project - - - - - - - Close - - - - - \ No newline at end of file
- {{ member.user_first_name }} {{ member.user_last_name }} -
- {{ member.user_email }} -
- No members assigned to this project -