{% import 'macro/accordion.html' as accordion %}
{% import 'macro/badge.html' as badge %}
{% import 'macro/card.html' as card %}
{% import 'macro/form.html' as form %}
{% if item.fields.name %}
{{ item.fields.name }}
{% else %}
Individual Part Lot
{% endif %}
{% if not solo %}
View
{% else %}
Back
{% endif %}
{% set lot_parts = item.parts() %}
{% for part in lot_parts[:4] %}
{% endfor %}
{% if lot_parts|length > 4 %}
+{{ lot_parts|length - 4 }} more parts
{% endif %}
{# Always show unique parts count and total quantity first for part lots #}
{{ item.parts()|length }} unique parts
{{ badge.quantity(item.total_quantity(), solo=solo, last=false) }}
{# Render remaining badges in configured order #}
{{ badge.render_ordered_badges(item, brickset_tags, brickset_owners, brickset_storages, brickset_purchase_locations, solo=solo, last=false, context='detail' if solo else 'grid') }}
{% if solo %}
{{ accordion.table(item.parts(), 'Parts', 'parts-inventory', 'lot-details', 'part/lot_table.html', icon='shapes-line', hamburger_menu=g.login.is_authenticated(), read_only=writes_disabled)}}
{% set management_read_only = writes_disabled %}{% include 'individual_part/management.html' %}
{% if g.login.is_authenticated() and not writes_disabled %}
{{ accordion.header('Danger zone', 'danger-zone', 'lot-details', danger=true, class='text-end') }}
Delete entire lot and all parts
{{ accordion.footer() }}
{% endif %}
{% endif %}
{% if solo and g.login.is_authenticated() and not writes_disabled %}
Confirm Delete
Are you sure you want to delete this entire lot and all {{ item.parts()|length }} parts in it? This action cannot be undone.