{% extends '../template.html' %}
{% block title %}Komplain{% endblock %}
{% block subcontent %}
	<h1>Komplain</h1>
	
	{% if data.length > 0 %}		
	<table class="data">
		<tr>
				<th>id</th>
				<th>Customer</th>
				<th>tgl</th>
				<th>komentar</th>
				<th>order</th>
				<th>kategori</th>
				<th></th>
			</tr>
		{% for row in data %}
			<tr>
				<td>{{row.id}}</td>
				<td>{{row.customer}}</td>
				<td>{{row.tgl}}</td>
				<td style="width:250px;">{{row.komentar}}</td>
				<td>
					{% if row.orders != null %}
					{% for o in row.orders %}
						<abbr title="Store : {{o.store}} - Agent : {{o.agent}}">
						<a style="text-decoration:none;" href="{% nav customer_order %}/{{ o.id }}">#{{ o.id }}</a>
						</abbr>
					{% endfor %}
					{% endif %}
				</td>
				<td>{{row.nama}}</td>
				<td><a href="{% nav komplain_del %}/{{ row.id }}">del</a></td>
			</tr>
		{% endfor %}
	</table>
	{% else %}
		Komplain is empty, klik new button bellow to make one.<br/>
	{% endif %}
	
	{% for p in page %}
	<a href="{{ p.link }}" class="{% if p.active == 'yes' %}active{% endif %} page">{{ p.number }}</a>
	{% endfor %}
{% endblock %}
