Spaces:
Sleeping
Sleeping
{% extends "base.html" %} | |
{% block title %}Leaderboard{% endblock %} | |
{% block content %} | |
<!-- ========= Keluhan Prioritas ========= --> | |
<div class="card mt-4"> | |
<div class="card-header"><h3 class="card-title">Daftar Keluhan Prioritas</h3></div> | |
<div class="card-body p-0"> | |
<div class="table-responsive"> | |
<table class="table table-hover table-striped mb-0"> | |
<thead> | |
<tr> | |
<th>ID</th><th>Keluhan</th><th>Topik</th><th>Instansi</th> | |
<th>Emosi</th><th>Skor Prioritas</th><th>Status</th> | |
</tr> | |
</thead> | |
<tbody> | |
{% for _, row in keluhan_prioritas.iterrows() %} | |
<tr> | |
<td>{{ row.keluhan }}</td> | |
<td>{{row.keyword}}}</td> | |
<td>{{ row.topik }}</td> | |
<td>{{ row.instansi }}</td> | |
<td>{{ row.emosi }}</td> | |
<td> | |
<span class="badge text-dark | |
{% if row.vikor <= 0.1 %}bg-danger | |
{% elif row.vikor <= 1 %}bg-warning | |
{% else %}bg-secondary | |
{% endif %}"> | |
{{ "%.4f"|format(row.vikor) }} | |
</span> | |
</td> | |
<td | |
<span class="badge {% if row.status == 'belum_ditanggapi' %}bg-warning | |
{% elif row.status == 'selesai' %}bg-success | |
{% else %}bg-secondary | |
{% endif %}" | |
style="cursor: pointer;" | |
data-bs-toggle="modal" | |
data-bs-target="#ubahStatusModal{{ row.id }}"> | |
{{ row.status }} | |
</span> | |
<!-- Modal konfirmasi --> | |
<div class="modal fade" id="ubahStatusModal{{ row.id }}" tabindex="-1" aria-labelledby="modalLabel{{ row.id }}" aria-hidden="true"> | |
<div class="modal-dialog"> | |
<div class="modal-content"> | |
<form action="{{ url_for('ubah_status') }}" method="POST"> | |
<div class="modal-header"> | |
<h5 class="modal-title" id="modalLabel{{ row.id }}">Ubah Status Keluhan</h5> | |
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Tutup"></button> | |
</div> | |
<div class="modal-body"> | |
<p>Ubah status keluhan dengan ID <strong>{{ row.id }}</strong> menjadi <strong>Selesai</strong>?</p> | |
<input type="hidden" name="id" value="{{ row.id }}"> | |
</div> | |
<div class="modal-footer"> | |
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Batal</button> | |
<button type="submit" class="btn btn-success">Ya, ubah</button> | |
</div> | |
</form> | |
</div> | |
</div> | |
</div> | |
</td> | |
</tr> | |
{% endfor %} | |
</tbody> | |
</table> | |
</div> | |
</div> | |
</div> | |
{% endblock %} | |