mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-08 11:37:25 +00:00
polishing ui for logging and settings
Some checks failed
Next.js Build Check / build (push) Has been cancelled
Some checks failed
Next.js Build Check / build (push) Has been cancelled
This commit is contained in:
parent
c8d1bfefa0
commit
295196fee3
3 changed files with 8 additions and 4 deletions
|
|
@ -15,7 +15,7 @@ export default async function SettingsLayout({
|
|||
const isDomnaUser = !!session?.user?.email?.endsWith("@domna.homes");
|
||||
|
||||
return (
|
||||
<div className="flex max-w-8xl mx-auto mt-6 px-4 gap-8">
|
||||
<div className="flex max-w-8xl mx-auto mt-6 px-4 gap-8 mb-8">
|
||||
<aside className="w-56 shrink-0">
|
||||
<p className="px-3 mb-1 text-xs font-semibold text-gray-400 uppercase tracking-widest">
|
||||
Settings
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ export default function PortfolioLogs({ portfolioId }: { portfolioId: string })
|
|||
const selectedTask = tasks.find((t) => t.id === selectedTaskId);
|
||||
|
||||
return (
|
||||
<div className="flex min-h-[600px] border border-gray-200 rounded-lg overflow-hidden bg-gray-50">
|
||||
<div className="flex min-h-[600px] max-h-[calc(100vh-220px)] border border-gray-200 rounded-lg overflow-hidden bg-gray-50">
|
||||
{/* Left sidebar - Task list */}
|
||||
<div className="w-80 border-r border-gray-200 bg-white shrink-0">
|
||||
<PortfolioTaskList
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
"use client";
|
||||
|
||||
import { useState } from "react";
|
||||
import { useState, useEffect } from "react";
|
||||
import { SubTask, PortfolioTask } from "./PortfolioLogs";
|
||||
import { ScrollArea } from "@/app/shadcn_components/ui/scroll-area";
|
||||
import { Card } from "@/app/shadcn_components/ui/card";
|
||||
|
|
@ -187,6 +187,10 @@ export default function PortfolioSubtaskDetails({
|
|||
}: PortfolioSubtaskDetailsProps) {
|
||||
const [expandedSubtasks, setExpandedSubtasks] = useState<Record<string, boolean>>({});
|
||||
|
||||
useEffect(() => {
|
||||
setExpandedSubtasks({});
|
||||
}, [task?.id]);
|
||||
|
||||
const toggleSubtask = (subtaskId: string) => {
|
||||
setExpandedSubtasks((prev) => ({ ...prev, [subtaskId]: !prev[subtaskId] }));
|
||||
};
|
||||
|
|
@ -273,7 +277,7 @@ export default function PortfolioSubtaskDetails({
|
|||
)}
|
||||
|
||||
{/* Subtasks List */}
|
||||
<ScrollArea className="flex-1 p-6">
|
||||
<ScrollArea key={task?.id} className="flex-1 p-6">
|
||||
<div className="space-y-4">
|
||||
<h3 className="text-base font-semibold text-gray-900">
|
||||
Subtasks ({subtasks.length})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue