{% extends '../center_store/template.html' %}
{% block subcontent %}
	{% if harus_update_shift == "y" %}
	<div class="error">
		<center>
		
		SHIFT MASTER BERBEDA DENGAN SHIFT TOKO INI <br/>
		MOHON SEGERA UPDATE SHIFT RIDER
		
		</center>
	</div>
	{% endif %}

	<h2><div style="float:right"> {{ tgl }}</div>Ketersediaan Rider </h2>
	<div class="kurir_menu">
	<a href="#" id="hapus_kurir">Hapus Rider</a>
		Rider Tersedia: <b>{{ tersedia }}</b> | 
		<a href="{% nav store_kurir_add %}">Tambah Rider Baru</a> 
	</div><br/>		
	{% if data.length > 0 %}		
	<table class="data">
		<tr>
			<th style="width:170px;">Nama Rider</th>
			<th>Telepon</th>
			<th style="width:80px;">Status</th>
			<th></th>
			<th style="display:none" class="hapus_kurir">Hapus</th>
		</tr>
		{% for row in data %}
		<tr>
			<td>
				{% if row.backup == "" %}{{row.nama}}{% else %}
				<div class="strike">{{row.nama}}</div>
				{{row.backup}}
				{% endif %}
			</td>
			<td>{{row.telepon}}</td>
			<td style="text-transform:capitalize;">
				{% if row.status != 'Belum Hadir' %}
				<span class="status_{{row.status}}">{{row.status}}</span>
				{% else %}
				<span class="status_na">{{row.status}}</span>
				{% endif %}
			</td>
			<td>
				<a href="{% nav store_kurir_edit %}/{{ row.id }}">Edit</a>
			</td>
			<td style="display:none" class="hapus_kurir">
				<a href="{% nav store_kurir_del %}/{{ row.id }}" style="color:red">HAPUS RIDER INI</a>
			</td>
		</tr>
		{% endfor %}
	</table>
	{% else %}<br/><br/>
		<center>
		- Tidak ada Rider -
		</center>
	{% endif %}
{% endblock %}
{% block script %}
<script type="text/javascript">
	$(document).ready(function() {
		$("#hapus_kurir").click(function() {
			$(".hapus_kurir").toggle();
		});
	});
</script>
{% endblock %}