{% if (json['errormsg']) %}
	{% include 'util/alert.twig' with {'type': 'warning','iconclass': 'fa fa-warning fa-2x', 'title': 'Error!', 'message': json['errormsg']} %}
{% else %}
	<h5>Kit Qty: {{ json['qty'] }}</h5>

	{% for component in json['data']['component'] %}
		<h4>{{ component['component item'] }}</h4>
		
		<table class="table table-striped table-sm mb-3">
			<thead>
				{% for column in json['columns']['component'] %}
					<th class="{{ module_json.get_justifyclass(column['headingjustify']) }}">
						{{ column['heading'] }}
					</th>
				{% endfor %}
			</thead>
			<tbody>
				<tr>
					{% for column, properties in json['columns']['component'] %}
						<td class="{{ module_json.get_justifyclass(properties['datajustify']) }}">
							{{ component[column] }}
						</td>
					{% endfor %}
				</tr>
			</tbody>
		</table>

		<table class="table table-striped table-sm mb-3">
			<thead>
				{% for column in json['columns']['warehouse'] %}
					<th class="{{ module_json.get_justifyclass(column['headingjustify']) }}">
						{{ column['heading'] }}
					</th>
				{% endfor %}
			</thead>
			<tbody>
				{% for warehouse in component['warehouse']  %}
					<tr>
						{% for column, properties in json['columns']['warehouse'] %}
							<td class="{{ module_json.get_justifyclass(properties['datajustify']) }}">
								{{ warehouse[column] }}
							</td>
						{% endfor %}
					</tr>
				{% endfor %}
			</tbody>
		</table>
	{% endfor %}

	<h6>Warehouses that meet the Requirement: {{ json['data']['whse meeting req']|join(', ') }}</h6>
{% endif %}
