diff --git a/assets/css/custom.css b/assets/css/custom.css index f2d77a4..8ba5e4f 100644 --- a/assets/css/custom.css +++ b/assets/css/custom.css @@ -1,196 +1,78 @@ :root { - --bg: #f6f7f9; + --bg: #f9fafb; --surface: #ffffff; - --surface-muted: #f1f3f6; - --border: #e2e6ea; - --text: #0f172a; + --surface-muted: #f3f4f6; + --border: #e5e7eb; + --text: #111827; --muted: #6b7280; - --accent: #111827; - --accent-soft: #e5e7eb; - --success: #0f766e; - --warning: #b45309; - --info: #1d4ed8; - --danger: #b91c1c; - --radius-sm: 6px; - --radius-md: 10px; - --radius-lg: 14px; - --shadow-sm: 0 6px 16px rgba(15, 23, 42, 0.06); + --accent: #2563eb; + --accent-soft: #dbeafe; + --success: #059669; + --warning: #d97706; + --info: #0284c7; + --danger: #dc2626; + --radius-sm: 8px; + --radius-md: 12px; + --radius-lg: 16px; + --shadow-sm: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06); + --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06); } -* { - box-sizing: border-box; -} +* { box-sizing: border-box; } body { background: var(--bg); color: var(--text); - font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; + font-family: "Inter", system-ui, -apple-system, sans-serif; font-size: 14px; + line-height: 1.5; margin: 0; min-height: 100vh; } -a { - color: var(--text); - text-decoration: none; -} - -a:hover { - color: #000; -} - -.navbar { - background: var(--surface); - border-bottom: 1px solid var(--border); -} - -.navbar-brand { - font-weight: 600; - letter-spacing: 0.2px; -} - -.nav-link { - color: var(--muted); - font-weight: 500; -} - -.nav-link.active, -.nav-link:hover { - color: var(--text); -} - -.hero { - background: var(--surface); - border: 1px solid var(--border); - border-radius: var(--radius-lg); - padding: 24px; - box-shadow: var(--shadow-sm); -} +a { color: var(--accent); text-decoration: none; transition: all 0.2s; } +a:hover { opacity: 0.8; } .card { border-radius: var(--radius-md); border: 1px solid var(--border); - box-shadow: none; + background: var(--surface); + box-shadow: var(--shadow-sm); + overflow: hidden; } .card-header { - background: var(--surface); + background: #f9fafb; border-bottom: 1px solid var(--border); font-weight: 600; + padding: 1rem; } -.card-muted { - background: var(--surface-muted); - border-radius: var(--radius-md); - padding: 16px; -} +.card-body { padding: 1.5rem; } -.section-title { - font-size: 15px; - font-weight: 600; - letter-spacing: 0.2px; -} - -.badge-soft { - border-radius: 999px; +.btn { + padding: 0.5rem 1rem; + border-radius: var(--radius-sm); font-weight: 500; - padding: 6px 10px; - font-size: 12px; - border: 1px solid transparent; - display: inline-flex; - align-items: center; - gap: 6px; -} - -.badge-soft.success { - color: var(--success); - border-color: rgba(15, 118, 110, 0.2); - background: rgba(15, 118, 110, 0.08); -} - -.badge-soft.warning { - color: var(--warning); - border-color: rgba(180, 83, 9, 0.2); - background: rgba(180, 83, 9, 0.08); -} - -.badge-soft.info { - color: var(--info); - border-color: rgba(29, 78, 216, 0.2); - background: rgba(29, 78, 216, 0.08); -} - -.badge-soft.danger { - color: var(--danger); - border-color: rgba(185, 28, 28, 0.2); - background: rgba(185, 28, 28, 0.08); -} - -.btn-primary { - background: var(--accent); - border-color: var(--accent); - border-radius: var(--radius-sm); - padding: 8px 14px; - font-weight: 600; -} - -.btn-outline-secondary { - border-radius: var(--radius-sm); - padding: 8px 14px; - font-weight: 600; -} - -.btn-light { - border-radius: var(--radius-sm); - padding: 8px 14px; -} - -.form-control, -.form-select { - border-radius: var(--radius-sm); - border-color: var(--border); font-size: 14px; - padding: 8px 10px; + transition: all 0.2s; } -.table { - font-size: 13px; -} +.btn-primary { background: var(--accent); color: white; border: none; } +.btn-primary:hover { background: #1d4ed8; } -.table thead th { - font-size: 12px; - text-transform: uppercase; - letter-spacing: 0.5px; - color: var(--muted); -} +.btn-outline-primary { border: 1px solid var(--accent); color: var(--accent); } -.toast { - border-radius: var(--radius-md); - box-shadow: var(--shadow-sm); -} - -.footer { - color: var(--muted); - font-size: 12px; - padding: 24px 0 40px; -} - -.empty-state { - padding: 28px; - border: 1px dashed var(--border); - border-radius: var(--radius-md); - color: var(--muted); - background: var(--surface); -} - -.tag { - display: inline-flex; - align-items: center; - gap: 6px; - background: var(--accent-soft); - color: var(--text); - border-radius: 999px; - padding: 4px 10px; - font-size: 12px; +.badge { + padding: 0.25rem 0.5rem; + border-radius: 9999px; + font-size: 0.75rem; font-weight: 500; } + +.form-control { + border: 1px solid var(--border); + border-radius: var(--radius-sm); + padding: 0.6rem; + width: 100%; +} \ No newline at end of file diff --git a/db/migrations/20260306_003_disposisi_surat_masuk.sql b/db/migrations/20260306_003_disposisi_surat_masuk.sql new file mode 100644 index 0000000..e4c851e --- /dev/null +++ b/db/migrations/20260306_003_disposisi_surat_masuk.sql @@ -0,0 +1,8 @@ +CREATE TABLE IF NOT EXISTS disposisi_surat_masuk ( + id INT AUTO_INCREMENT PRIMARY KEY, + surat_masuk_id INT NOT NULL, + tujuan_departemen VARCHAR(100) NOT NULL, + instruksi TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + FOREIGN KEY (surat_masuk_id) REFERENCES surat_masuk(id) ON DELETE CASCADE +); diff --git a/surat_masuk_view.php b/surat_masuk_view.php index 6eb5ac4..b0dce69 100644 --- a/surat_masuk_view.php +++ b/surat_masuk_view.php @@ -8,50 +8,67 @@ ensure_tables(); $pdo = db(); $id = isset($_GET['id']) ? (int)$_GET['id'] : 0; + +if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['disposisi_submit'])) { + $tujuan = $_POST['tujuan_departemen'] ?? ''; + $instruksi = $_POST['instruksi'] ?? ''; + if (!empty($tujuan)) { + $stmt = $pdo->prepare("INSERT INTO disposisi_surat_masuk (surat_masuk_id, tujuan_departemen, instruksi) VALUES (?, ?, ?)"); + $stmt->execute([$id, $tujuan, $instruksi]); + } +} + $stmt = $pdo->prepare("SELECT * FROM surat_masuk WHERE id = ?"); $stmt->execute([$id]); $row = $stmt->fetch(); +$disposisi = []; +if ($row) { + $stmtDispo = $pdo->prepare("SELECT * FROM disposisi_surat_masuk WHERE surat_masuk_id = ? ORDER BY created_at DESC"); + $stmtDispo->execute([$id]); + $disposisi = $stmtDispo->fetchAll(); +} + render_header('Detail Surat Masuk', 'masuk'); ?> -
+
-
-
Detail Surat Masuk
-
+
+
Detail Surat Masuk
+
Data surat masuk tidak ditemukan.
Tanggal Surat
-
+
Nomor Surat
-
+
Pengirim
-
+
Departemen Tujuan
-
+
Perihal
-
+
Status
- +
Lampiran
- Unduh Lampiran + Download File Tidak ada lampiran. @@ -60,16 +77,48 @@ render_header('Detail Surat Masuk', 'masuk');
-
-
-
-
Aksi Cepat
-
- Kembali ke Daftar - Buat Surat Keluar + +
+
Riwayat Disposisi
+
+
    + +
  • Belum ada disposisi.
  • + + +
  • +
    + + +
    +

    +
  • + + +
+ +
+
+
Buat Disposisi
+
+
+
+ + +
+
+ + +
+ +
+
+
+ Kembali ke Daftar +
- + \ No newline at end of file