- 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)
124 lines
7.2 KiB
HTML
124 lines
7.2 KiB
HTML
{% load static %}
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Login - IT All Role Kerinci Hydropower</title>
|
|
<link rel="stylesheet" href="{% static 'dist/style.css' %}?v=2.1">
|
|
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
|
|
<style>
|
|
body { font-family: 'Inter', sans-serif; }
|
|
</style>
|
|
</head>
|
|
<body class="bg-gray-50 text-gray-800 font-sans antialiased h-screen flex flex-col justify-center items-center p-4">
|
|
|
|
<!-- Toast Notification Container -->
|
|
{% if messages %}
|
|
<div id="toast-container" class="fixed top-5 right-5 z-50 flex flex-col gap-3">
|
|
{% for message in messages %}
|
|
<div class="toast-item relative overflow-hidden bg-white border border-gray-100 shadow-[0_8px_30px_rgb(0,0,0,0.12)] rounded-xl p-4 flex items-start gap-3 w-[350px] transform translate-y-[-20px] opacity-0 transition-all duration-300">
|
|
<!-- Icon -->
|
|
<div class="flex-shrink-0 mt-0.5">
|
|
{% if message.tags == 'error' %}
|
|
<svg class="w-5 h-5 text-red-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
|
|
{% else %}
|
|
<svg class="w-5 h-5 text-blue-500" 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>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<!-- Message Content -->
|
|
<div class="flex-1">
|
|
<p class="text-sm font-bold text-gray-800">{% if message.tags == 'error' %}Akses Ditolak{% else %}Pemberitahuan{% endif %}</p>
|
|
<p class="text-xs text-gray-500 mt-0.5 leading-relaxed">{{ message }}</p>
|
|
</div>
|
|
|
|
<!-- Close Button -->
|
|
<button onclick="this.closest('.toast-item').remove()" class="text-gray-400 hover:text-gray-600 transition-colors focus:outline-none">
|
|
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>
|
|
</button>
|
|
|
|
<!-- Progress bar -->
|
|
<div class="absolute bottom-0 right-0 h-1 {% if message.tags == 'error' %}bg-red-500{% else %}bg-blue-500{% endif %} toast-progress" style="width: 100%;"></div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
<style>
|
|
@keyframes toastProgress {
|
|
from { width: 100%; }
|
|
to { width: 0%; }
|
|
}
|
|
.toast-progress {
|
|
animation: toastProgress 4s linear forwards;
|
|
}
|
|
</style>
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
const toasts = document.querySelectorAll('.toast-item');
|
|
toasts.forEach((toast, index) => {
|
|
setTimeout(() => {
|
|
toast.classList.remove('translate-y-[-20px]', 'opacity-0');
|
|
toast.classList.add('translate-y-0', 'opacity-100');
|
|
}, index * 150);
|
|
|
|
setTimeout(() => {
|
|
toast.classList.remove('translate-y-0', 'opacity-100');
|
|
toast.classList.add('translate-y-[-10px]', 'opacity-0');
|
|
setTimeout(() => toast.remove(), 300);
|
|
}, 4000);
|
|
});
|
|
});
|
|
</script>
|
|
{% endif %}
|
|
|
|
<div class="w-full max-w-md">
|
|
<!-- Card -->
|
|
<div class="bg-white rounded-3xl shadow-[0_8px_30px_rgb(0,0,0,0.08)] border border-gray-100 overflow-hidden">
|
|
<!-- Header Logo -->
|
|
<div class="bg-gray-50/50 border-b border-gray-100 p-8 flex justify-center">
|
|
<img src="{% static 'img/main_logo.png' %}" alt="IT All Role Kerinci Hydropower" class="h-12 w-auto object-contain">
|
|
</div>
|
|
|
|
<!-- Form Body -->
|
|
<div class="p-8">
|
|
<div class="text-center mb-8">
|
|
<h1 class="text-2xl font-extrabold text-gray-900">Masuk ke Sistem</h1>
|
|
<p class="text-sm text-gray-500 mt-1">Sistem Manajemen Aset IT - PT. KMH</p>
|
|
</div>
|
|
|
|
<form action="{% url 'login' %}{% if request.GET.next %}?next={{ request.GET.next }}{% endif %}" method="POST" class="space-y-5">
|
|
{% csrf_token %}
|
|
|
|
<div>
|
|
<label class="block text-sm font-bold text-gray-700 mb-2">Username atau Email</label>
|
|
<div class="relative">
|
|
<input type="text" name="username" required class="w-full pl-11 pr-4 py-3 rounded-xl border border-gray-200 text-sm focus:outline-none focus:border-kerinci focus:ring-2 focus:ring-kerinci-light bg-gray-50 transition-all" placeholder="Masukkan username atau email">
|
|
<svg class="w-5 h-5 text-gray-400 absolute left-4 top-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"></path></svg>
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<label class="block text-sm font-bold text-gray-700 mb-2">Password</label>
|
|
<div class="relative">
|
|
<input type="password" name="password" required class="w-full pl-11 pr-4 py-3 rounded-xl border border-gray-200 text-sm focus:outline-none focus:border-kerinci focus:ring-2 focus:ring-kerinci-light bg-gray-50 transition-all" placeholder="Masukkan password">
|
|
<svg class="w-5 h-5 text-gray-400 absolute left-4 top-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"></path></svg>
|
|
</div>
|
|
</div>
|
|
|
|
<button type="submit" class="w-full py-3.5 mt-2 bg-kerinci text-white font-bold rounded-xl text-sm shadow-sm shadow-kerinci/30 hover:bg-kerinci-dark hover:shadow-md transition-all flex items-center justify-center space-x-2">
|
|
<span>Masuk</span>
|
|
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14 5l7 7m0 0l-7 7m7-7H3"></path></svg>
|
|
</button>
|
|
</form>
|
|
</div>
|
|
|
|
<!-- Footer -->
|
|
<div class="bg-gray-50/50 py-4 text-center border-t border-gray-100">
|
|
<p class="text-[10px] font-bold text-gray-400 uppercase tracking-widest">© {% now "Y" %} IT ALL ROLE</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|