Implement note for additional components
This commit is contained in:
parent
00d5271f0c
commit
1e4e63ec27
@ -266,6 +266,7 @@ class AdditionalComponent(Component):
|
||||
designators: Optional[str] = None # used for components definedi in the
|
||||
# additional_bom_items section within another component
|
||||
bgcolor: SingleColor = None # ^ same here
|
||||
note: str = None
|
||||
|
||||
def __post_init__(self):
|
||||
super().fill_partnumbers()
|
||||
|
||||
@ -72,7 +72,7 @@ def gv_node_component(component: Component) -> Table:
|
||||
|
||||
line_image, line_image_caption = image_and_caption_cells(component)
|
||||
line_additional_component_table = gv_additional_component_table(component)
|
||||
line_notes = [html_line_breaks(component.notes)]
|
||||
line_notes = [Td(html_line_breaks(component.notes), balign="left")]
|
||||
|
||||
if isinstance(component, Connector):
|
||||
if component.style != "simple":
|
||||
@ -120,6 +120,7 @@ def gv_additional_component_table(component):
|
||||
Td(f"{subitem.bom_qty}", align="right"),
|
||||
Td(f"{subitem.qty.unit if subitem.qty.unit else 'x'}", align="left"),
|
||||
Td(f"{subitem.description}", align="left"),
|
||||
Td(f"{subitem.note if subitem.note else ''}", align="left"),
|
||||
]
|
||||
)
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user