Fakultas Ilmu Komputer UI

Commit c63add5c authored by Annisa Devi Nurmalasari's avatar Annisa Devi Nurmalasari
Browse files

[REFACTOR] Mengubah button request investasi

parent 274609d8
<div class="card">
<div class="card-header text-end">
{% include 'admin/components/status_header.html' with status=item.status_pembelian %}
</div>
<div class="card-body">
<table class="table" aria-describedby="pengadaanTableDesc">
<tbody>
<tr>
<td colspan="2">
<strong>Pengadaan</strong>: <br/>
<a href="{% url 'admin:detail_req_pengadaan' item.pengadaan.pk%}" style="color: #1fae9b; text-decoration:underline;">
{{item.pengadaan.toko.get_full_name}}
</a> <br/>
Dana terkumpul saat ini -<br/>
- <em>
<strong>Rp {{item.pengadaan.get_formatted_accumulated_dana}} ({{item.pengadaan.get_accumulated_dana_in_percent}}%)</strong> dari Rp {{item.pengadaan.get_formatted_biaya}}
</em>
</td>
</tr>
<tr>
<th scope="row">Pemilik investasi</th>
<td>: {{item.investor.get_full_name}}</td>
</tr>
<tr>
<th scope="row">Calon pembeli</th>
<td>: {{item.pembeli.get_full_name}}</td>
</tr>
<tr>
<th scope="row">Jumlah investasi</th>
<td>: Rp {{item.get_formatted_nominal}}</td>
</tr>
<tr>
<th scope="row">Waktu transaksi</th>
<td>: {{item.get_formatted_timestamp}}</td>
</tr>
<tr>
<th scope="row">Bukti pembayaran</th>
<td>: https://link_pembayaran_xxxx.xxxx</td>
</tr>
</tbody>
</table>
<div class="text-end">
{% if item.status_pembelian == 'MPA' %}
<a href="{% url 'admin:dec_beli_investasi' item.pk %}" class="btn btn-danger me-2">Tolak</a>
<a href="{% url 'admin:acc_beli_investasi' item.pk %}" class="btn btn-primary">Terima</a>
{% endif %}
</div>
</div>
<div class="card-header text-end">
{% include 'admin/components/status_header.html' with status=item.status_pembelian %}
</div>
<div class="card-body">
<table class="table" aria-describedby="pengadaanTableDesc">
<tbody>
<tr>
<td colspan="2">
<strong>Pengadaan</strong>: <br/>
<a href="{% url 'admin:detail_req_pengadaan' item.pengadaan.pk%}" style="color: #1fae9b; text-decoration:underline;">
{{item.pengadaan.toko.get_full_name}}
</a> <br/>
Dana terkumpul saat ini -<br/>
- <em>
<strong>Rp {{item.pengadaan.get_formatted_accumulated_dana}} ({{item.pengadaan.get_accumulated_dana_in_percent}}%)</strong> dari Rp {{item.pengadaan.get_formatted_biaya}}
</em>
</td>
</tr>
<tr>
<th scope="row">Pemilik investasi</th>
<td>: {{item.investor.get_full_name}}</td>
</tr>
<tr>
<th scope="row">Calon pembeli</th>
<td>: {{item.pembeli.get_full_name}}</td>
</tr>
<tr>
<th scope="row">Jumlah investasi</th>
<td>: Rp {{item.get_formatted_nominal}}</td>
</tr>
<tr>
<th scope="row">Waktu transaksi</th>
<td>: {{item.get_formatted_timestamp}}</td>
</tr>
<tr>
<th scope="row">Bukti pembayaran</th>
<td>: https://link_pembayaran_xxxx.xxxx</td>
</tr>
</tbody>
</table>
<div class="text-end">
{% if item.status_pembelian == 'MPA' %}
<a href="{% url 'admin:dec_beli_investasi' item.pk %}" class="btn btn-danger me-2">Tolak</a>
<a href="{% url 'admin:acc_beli_investasi' item.pk %}" class="btn btn-secondary">Terima</a>
{% endif %}
</div>
</div>
</div>
<div class="card">
<div class="card-header text-end">
{% include 'admin/components/status_header.html' with status=item.status %}
</div>
<div class="card-body">
<table class="table" aria-describedby="pengadaanTableDesc">
<tbody>
<tr>
<td colspan="2">
<strong>Pengadaan</strong>: <br/>
<a href="{% url 'admin:detail_req_pengadaan' item.pengadaan.pk%}" style="color: #1fae9b; text-decoration:underline;">
{{item.pengadaan.toko.get_full_name}}
</a> <br/>
Dana terkumpul saat ini -<br/>
- <em>
<strong>Rp {{item.pengadaan.get_formatted_accumulated_dana}} ({{item.pengadaan.get_accumulated_dana_in_percent}}%)</strong> dari Rp {{item.pengadaan.get_formatted_biaya}}
</em>
</td>
</tr>
<tr>
<th scope="row">Investor</th>
<td>: {{item.investor.get_full_name}}</td>
</tr>
<tr>
<th scope="row">Jumlah investasi</th>
<td>: Rp {{item.get_formatted_nominal}}</td>
</tr>
<tr>
<th scope="row">Waktu transaksi</th>
<td>: {{item.get_formatted_timestamp}}</td>
</tr>
<tr>
<th scope="row">Bukti pembayaran</th>
<td>: https://link_pembayaran_xxxx.xxxx</td>
</tr>
{% if item.status == 'MPA' %}
<tr>
<td colspan="2">
<small>Dana terkumpul setelah investasi diterima:
<strong>Rp {{item.get_formatted_post_accumulated_dana}} ({{item.get_post_accumulated_dana_percentage}}%)</strong></small>
{% if item.get_post_accumulated_dana > item.pengadaan.total_biaya %}
<br>
<small style="color: red;">Peringatan: Investasi melebihi total dana yang dibutuhkan!</small>
{% endif %}
</td>
</tr>
<div class="card-header text-end">
{% include 'admin/components/status_header.html' with status=item.status %}
</div>
<div class="card-body">
<table class="table" aria-describedby="pengadaanTableDesc">
<tbody>
<tr>
<td colspan="2">
<strong>Pengadaan</strong>: <br/>
<a href="{% url 'admin:detail_req_pengadaan' item.pengadaan.pk%}" style="color: #1fae9b; text-decoration:underline;">
{{item.pengadaan.toko.get_full_name}}
</a> <br/>
Dana terkumpul saat ini -<br/>
- <em>
<strong>Rp {{item.pengadaan.get_formatted_accumulated_dana}} ({{item.pengadaan.get_accumulated_dana_in_percent}}%)</strong> dari Rp {{item.pengadaan.get_formatted_biaya}}
</em>
</td>
</tr>
<tr>
<th scope="row">Investor</th>
<td>: {{item.investor.get_full_name}}</td>
</tr>
<tr>
<th scope="row">Jumlah investasi</th>
<td>: Rp {{item.get_formatted_nominal}}</td>
</tr>
<tr>
<th scope="row">Waktu transaksi</th>
<td>: {{item.get_formatted_timestamp}}</td>
</tr>
<tr>
<th scope="row">Bukti pembayaran</th>
<td>: https://link_pembayaran_xxxx.xxxx</td>
</tr>
{% if item.status == 'MPA' %}
<tr>
<td colspan="2">
<small>Dana terkumpul setelah investasi diterima:
<strong>Rp {{item.get_formatted_post_accumulated_dana}} ({{item.get_post_accumulated_dana_percentage}}%)</strong></small>
{% if item.get_post_accumulated_dana > item.pengadaan.total_biaya %}
<br>
<small style="color: red;">Peringatan: Investasi melebihi total dana yang dibutuhkan!</small>
{% endif %}
</tbody>
</table>
<div class="text-end">
{% if item.get_post_accumulated_dana > item.pengadaan.total_biaya and item.status == 'MPA' %}
<a href="{% url 'admin:dec_investasi' item.pk %}" class="btn btn-danger me-2">Tolak</a>
<button class="btn btn-primary" disabled>Terima</button>
{% elif item.status == 'MPA' %}
<a href="{% url 'admin:dec_investasi' item.pk %}" class="btn btn-danger me-2">Tolak</a>
<a href="{% url 'admin:acc_investasi' item.pk %}" class="btn btn-primary">Terima</a>
</td>
</tr>
{% endif %}
<a href="{% url 'admin:delete_investasi' item.pk %}" class="btn btn-danger">Hapus</a>
</div>
</div>
</tbody>
</table>
<div class="text-end">
{% if item.get_post_accumulated_dana > item.pengadaan.total_biaya and item.status == 'MPA' %}
<a href="{% url 'admin:dec_investasi' item.pk %}" class="btn btn-danger me-2">Tolak</a>
<button class="btn btn-primary" disabled>Terima</button>
{% elif item.status == 'MPA' %}
<a href="{% url 'admin:dec_investasi' item.pk %}" class="btn btn-danger me-2">Tolak</a>
<a href="{% url 'admin:acc_investasi' item.pk %}" class="btn btn-secondary">Terima</a>
{% endif %}
<a href="{% url 'admin:delete_investasi' item.pk %}" class="btn btn-danger">Hapus</a>
</div>
</div>
</div>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment