{% set page_title = 'Bloom LIMS Object Details' %}
{{ page_title }}
{% set bloom_mod = 'lims' %}
{% include 'legacy/bloom_header.html' %}
{% macro render_step(step, accordion_states) %}
{% if step.polymorphic_discriminator == 'workflow_step_instance' or step.polymorphic_discriminator == 'workflow_instance' %}
{% else %}
{% if step.type == 'plate' or step.type == 'rack' %}
{% else %}
{% if step.type == 'package' %}
{% else %}
{% endif %}
{% endif %}
{% endif %}
{% if step.json_addl and 'action_groups' in step.json_addl %}
{% for group_key, group_value in step.json_addl['action_groups'].items() %}
{{ group_value.group_name }}
{% for action_key, action_value in group_value.actions.items() %}
{% endfor %}
{% endfor %}
{% endif %}
{# Query both container_instance AND content_instance lineages per Rule 6 #}
{% if step.parent_of_lineages %}
{% for child_step in step.get_sorted_parent_of_lineages(['container_instance', 'content_instance']) %}
{% if child_step.child_instance.category != 'workflow_step' and udat.get('wf_filter','off') == 'off' %}
{% for step in workflow.get_sorted_parent_of_lineages(['workflow_instance']) %}
{% if loop.first %}
{{ render_step(step.child_instance, accordion_states) }}