              {/* 부자재(SM) 탭 */}
              <TabsContent value="SM" className="mt-0">
                <div className="rounded-md border">
                  <Table>
                    <TableHeader>
                      <TableRow>
                        <TableHead>번호</TableHead>
                        <TableHead>품목코드</TableHead>
                        <TableHead>품목명</TableHead>
                        <TableHead>규격</TableHead>
                        <TableHead>단위</TableHead>
                        <TableHead className="text-right">작업</TableHead>
                      </TableRow>
                    </TableHeader>
                    <TableBody>
                      {filteredItems.length === 0 ? (
                        <TableRow>
                          <TableCell colSpan={6} className="text-center py-8 text-muted-foreground">
                            검색 결과가 없습니다.
                          </TableCell>
                        </TableRow>
                      ) : (
                        paginatedItems.map((item, index) => (
                          <TableRow 
                            key={`${item.id}-${index}`}
                            className="cursor-pointer hover:bg-muted/50"
                            onClick={() => handleViewChange("view", item)}
                          >
                            <TableCell className="text-muted-foreground">{filteredItems.length - (startIndex + index)}</TableCell>
                            <TableCell>
                              <code className="text-xs bg-gray-100 px-2 py-1 rounded">
                                {item.itemCode}
                              </code>
                            </TableCell>
                            <TableCell>{item.itemName}</TableCell>
                            <TableCell className="text-sm text-muted-foreground">
                              {item.specification || '-'}
                            </TableCell>
                            <TableCell>
                              <Badge variant="secondary" className="text-xs">{item.unit || '-'}</Badge>
                            </TableCell>
                            <TableCell className="text-right" onClick={(e) => e.stopPropagation()}>
                              <div className="flex items-center justify-end gap-2">
                                <Button
                                  variant="ghost"
                                  size="sm"
                                  onClick={() => handleViewChange("edit", item)}
                                >
                                  <Edit className="h-4 w-4" />
                                </Button>
                                <Button
                                  variant="ghost"
                                  size="sm"
                                  onClick={() => {
                                    setItemToDelete(item);
                                    setIsDeleteDialogOpen(true);
                                  }}
                                >
                                  <Trash2 className="h-4 w-4 text-red-600" />
                                </Button>
                              </div>
                            </TableCell>
                          </TableRow>
                        ))
                      )}
                    </TableBody>
                  </Table>
                </div>
