import type { Component } from 'solid-js'; import { For, Show } from 'solid-js'; import { FolderKanban, Plus, FileText, ChevronDown } from 'lucide-solid'; import ScopeCard from '../ScopeCard'; import NoteEditor from '../NoteEditor'; import type { Scope, SubScope, EstimateItem } from '../../types'; interface ScopesListProps { scopes: Scope[]; subScopes: SubScope[]; items: EstimateItem[]; isNotesExpanded: boolean; setIsNotesExpanded: (expanded: boolean) => void; generalEstimateNotes: string; setGeneralEstimateNotes: (notes: string) => void; updateScope: (id: string, updates: Partial) => void; deleteScope: (id: string) => void; updateItem: (id: string, updates: Partial) => void; deleteItem: (id: string) => void; addSubScope: (scopeId: string) => void; updateSubScope: (id: string, updates: Partial) => void; deleteSubScope: (id: string) => void; handleDragStart: (e: DragEvent, id: string) => void; handleDrop: (e: DragEvent, scopeId?: string, subScopeId?: string) => void; handleBulkUpdate: (scopeId: string, subScopeId: string | undefined, updates: any) => void; duplicateItem: (id: string) => void; copySubScopeItems: (sourceSubScopeId: string, targetSubScopeId: string) => void; setApplyTemplateScopeId: (id: string | null) => void; isSidebarCollapsed: () => boolean; selectedIds: string[]; toggleSelection: (id: string, isMulti: boolean, isShift: boolean) => void; clearSelection: (e?: MouseEvent) => void; anyDescriptionIsLong: () => boolean; addScope: () => void; } export const ScopesList: Component = (props) => { return (
{(scope) => (
ss.scopeId === scope.id)} items={props.items.filter(i => i.scopeId === scope.id)} onUpdateScope={props.updateScope} onDeleteScope={props.deleteScope} onUpdateItem={props.updateItem} onDeleteItem={props.deleteItem} onAddSubScope={props.addSubScope} onUpdateSubScope={props.updateSubScope} onDeleteSubScope={props.deleteSubScope} onDragStart={props.handleDragStart} onDrop={props.handleDrop} onBulkUpdate={props.handleBulkUpdate} onDuplicateItem={props.duplicateItem} allScopes={props.scopes} allSubScopes={props.subScopes} onCopySubScopeItems={props.copySubScopeItems} onOpenApplyTemplate={props.setApplyTemplateScopeId} isSidebarCollapsed={props.isSidebarCollapsed} selectedIds={props.selectedIds} onToggleSelection={props.toggleSelection} onClearSelection={props.clearSelection} hideColumns={props.anyDescriptionIsLong()} />
)}
0}>

No Scopes Defined

Click "New Scope" in the header to start building your estimate structure.

); };