feat: implement consumable inventory module, network LAN access, and CI/CD enhancements
- Modul Consumable Item: model master, buku besar transaksi (stock ledger), purchase unit conversion, stock opname, dan transaction reversal - Integrasi ke Employee Management, Asset Unit, dan tiket/work order - Konfigurasi akses jaringan lokal (LAN) via 0.0.0.0:8000, ALLOWED_HOSTS, dan CSRF_TRUSTED_ORIGINS otomatis - Script pembuka firewall Windows (buka_firewall_lan.bat) dan menu interaktif run.bat - Skema migrasi 0019_consumableitem_consumabletransaction - Seeder 11 item consumable riil (seed_consumables.py) - Test suite komprehensif (41 automated tests, 100% lulus) - Pipeline CI/CD GitHub Actions (.github/workflows/ci.yml)
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block page_title %}Backup Data{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="mb-8">
|
||||
<h2 class="text-3xl font-extrabold text-gray-900 mb-2">Backup Database</h2>
|
||||
<p class="text-sm text-gray-500">Cadangkan seluruh data sistem untuk mencegah kehilangan data jika terjadi masalah pada server.</p>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
|
||||
<div class="bg-white rounded-3xl shadow-sm border border-gray-100 p-8">
|
||||
<div class="mb-6">
|
||||
<h3 class="text-xl font-bold text-gray-900">Ekspor Data Sistem</h3>
|
||||
<p class="text-sm text-gray-500">Mencakup aset, riwayat, dan karyawan.</p>
|
||||
</div>
|
||||
|
||||
<p class="text-gray-600 text-sm mb-8 leading-relaxed">
|
||||
Sistem akan menyusun seluruh struktur dan data yang Anda miliki saat ini menjadi sebuah file `.json`. File ini sangat penting dan bisa digunakan untuk memulihkan (restore) server kapan pun diperlukan.
|
||||
</p>
|
||||
|
||||
<form method="POST">
|
||||
{% csrf_token %}
|
||||
<div class="mb-6">
|
||||
<label for="format" class="block text-sm font-semibold text-gray-700 mb-2">Format File Backup</label>
|
||||
<select name="format" id="format" class="w-full rounded-xl border-gray-200 shadow-sm focus:border-kerinci focus:ring focus:ring-kerinci focus:ring-opacity-50 text-sm py-2.5 px-3">
|
||||
<option value="json">Format JSON (Standar Django - loaddata)</option>
|
||||
<option value="sql">Format SQL (Database MySQL Mentah)</option>
|
||||
</select>
|
||||
<p class="text-xs text-gray-500 mt-2">*Pilih SQL jika Anda ingin melakukan import langsung via phpMyAdmin/MySQL.</p>
|
||||
</div>
|
||||
<button type="submit" class="w-full bg-kerinci hover:bg-kerinci-dark text-white font-bold py-3.5 px-6 rounded-xl transition-colors shadow-sm shadow-kerinci/30 flex items-center justify-center space-x-2 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-kerinci">
|
||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"></path></svg>
|
||||
<span>Unduh File Backup</span>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="bg-white rounded-3xl shadow-sm border border-gray-100 p-8">
|
||||
<h3 class="text-lg font-bold text-gray-900 mb-4">Informasi Penting</h3>
|
||||
<ul class="space-y-4">
|
||||
<li class="flex items-start">
|
||||
<svg class="w-5 h-5 text-kerinci mt-0.5 mr-3 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
|
||||
<p class="text-sm text-gray-600">Simpan file backup ini di tempat yang sangat aman (seperti Google Drive atau Flashdisk eksternal) dan hindari membagikannya ke pihak luar.</p>
|
||||
</li>
|
||||
<li class="flex items-start">
|
||||
<svg class="w-5 h-5 text-kerinci mt-0.5 mr-3 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
|
||||
<p class="text-sm text-gray-600">Lakukan backup secara rutin (minimal seminggu sekali) terutama jika Anda sering menambahkan unit atau karyawan baru ke dalam sistem.</p>
|
||||
</li>
|
||||
<li class="flex items-start">
|
||||
<svg class="w-5 h-5 text-kerinci mt-0.5 mr-3 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"></path></svg>
|
||||
<p class="text-sm text-gray-600">Untuk melakukan <em>restore</em>, berikan file ini kepada Teknisi IT yang memelihara sistem untuk dimuat ulang menggunakan perintah <code>loaddata</code>.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user