Django_Basic_Manufacturing_3/templates/inventory/warehouse_confirm_delete.html
2025-08-22 17:05:22 +07:00

111 lines
5.1 KiB
HTML

{% extends 'base.html' %}
{% load indonesian_filters %}
{% block title %}Delete Warehouse - {{ warehouse.name }}{% endblock %}
{% block content %}
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
<h1 class="h2">Delete Warehouse</h1>
<div class="btn-toolbar mb-2 mb-md-0">
<a href="{% url 'inventory:warehouse_detail' warehouse.id %}" class="btn btn-outline-secondary">
<i class="fas fa-arrow-left"></i> Cancel
</a>
</div>
</div>
<div class="row justify-content-center">
<div class="col-lg-8">
<div class="card border-warning">
<div class="card-header bg-warning">
<h5 class="mb-0 text-dark">
<i class="fas fa-exclamation-triangle"></i> Confirm Warehouse Deletion
</h5>
</div>
<div class="card-body">
<div class="alert alert-warning">
<h6>⚠️ Warning: This action cannot be undone!</h6>
<p class="mb-0">You are about to permanently delete the warehouse and all associated data.</p>
</div>
<div class="row">
<div class="col-md-6">
<h6>Warehouse Information:</h6>
<table class="table table-sm">
<tr>
<th width="40%">Name:</th>
<td><strong>{{ warehouse.name }}</strong></td>
</tr>
<tr>
<th>Location:</th>
<td>{{ warehouse.location|default:"-" }}</td>
</tr>
<tr>
<th>Status:</th>
<td>
{% if warehouse.is_active %}
<span class="badge bg-success">Active</span>
{% else %}
<span class="badge bg-secondary">Inactive</span>
{% endif %}
</td>
</tr>
</table>
</div>
<div class="col-md-6">
<h6>Data Impact:</h6>
<div class="bg-light p-3 rounded">
<p class="mb-2"><strong>Inventory Items:</strong> {{ inventory_count }} products stored</p>
<p class="mb-2"><strong>Total Products:</strong> {{ total_products }} different items</p>
<p class="mb-2"><strong>Total Value:</strong> {{ total_value|format_rupiah }}</p>
<p class="mb-0"><strong>Related Records:</strong> Stock movements and inventory history</p>
</div>
</div>
</div>
<div class="mt-4">
<p><strong>What happens when you delete this warehouse:</strong></p>
<ul class="text-muted">
<li>The warehouse record will be permanently removed from the database</li>
<li>All inventory items in this warehouse will be deleted</li>
<li>Stock movements for this warehouse will be removed</li>
<li>Historical data will be preserved where possible</li>
<li>This action cannot be reversed</li>
</ul>
</div>
</div>
<div class="card-footer">
<form method="post" class="d-inline">
{% csrf_token %}
<button type="submit" class="btn btn-danger btn-lg">
<i class="fas fa-trash"></i> Yes, Delete Warehouse
</button>
</form>
<a href="{% url 'inventory:warehouse_detail' warehouse.id %}" class="btn btn-secondary btn-lg ms-2">
<i class="fas fa-times"></i> Cancel
</a>
</div>
</div>
<div class="card mt-4">
<div class="card-header">
<h6 class="mb-0">Alternative Actions</h6>
</div>
<div class="card-body">
<p class="mb-2">Instead of deleting, consider these alternatives:</p>
<div class="row">
<div class="col-md-6">
<a href="{% url 'inventory:edit_warehouse' warehouse.id %}" class="btn btn-outline-primary w-100 mb-2">
<i class="fas fa-edit"></i> Edit Warehouse Details
</a>
</div>
<div class="col-md-6">
<a href="{% url 'inventory:warehouse_list' %}" class="btn btn-outline-secondary w-100 mb-2">
<i class="fas fa-list"></i> Return to Warehouse List
</a>
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}