Deploy Laravel rebuild via Coolify
Point Docker and Coolify compose to the Laravel rebuild app so mahasiswa, dosen, and admin flows are served from the new Laravel public entrypoint.
This commit is contained in:
@@ -0,0 +1,94 @@
|
||||
<x-admin.partials.page-shell :title="$title" :sidebar="$sidebar">
|
||||
<section class="rounded-xl bg-white p-4 shadow-[0_8px_12px_rgba(13,10,44,0.04)] lg:p-6">
|
||||
<div class="flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between">
|
||||
<div>
|
||||
<ol class="flex flex-wrap items-center gap-2 text-sm text-[#6B7280]">
|
||||
<li class="inline-flex items-center gap-2">
|
||||
<span class="text-[#625DF5]">@include('dashboard.partials.icon', ['icon' => 'home'])</span>
|
||||
<span>Home</span>
|
||||
</li>
|
||||
<li>/</li>
|
||||
<li class="font-medium text-[#15171A]">{{ $pageTitle }}</li>
|
||||
</ol>
|
||||
<h1 class="mt-4 text-[26px] font-bold leading-[34px] text-[#15171A]">{{ $pageTitle }}</h1>
|
||||
<p class="mt-2 max-w-[880px] text-sm leading-7 text-[#4B5563]">{{ $pageDescription }}</p>
|
||||
</div>
|
||||
<div class="flex flex-wrap items-center gap-3">
|
||||
<div class="rounded-md border border-[#E5E7EB] bg-[#F9FAFB] px-4 py-3 text-sm text-[#15171A]">{{ $pageDate }}</div>
|
||||
<div class="rounded-md border border-[#E5E7EB] bg-[#F9FAFB] px-4 py-3 text-sm text-[#15171A]">{{ $user['username'] }} · {{ $user['nmprodi'] }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@if (session('error'))
|
||||
<div class="rounded-xl border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-800">{{ session('error') }}</div>
|
||||
@endif
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="rounded-xl border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-800">
|
||||
<p class="font-semibold">Import belum bisa diproses.</p>
|
||||
<ul class="mt-2 list-disc space-y-1 pl-5">
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="grid gap-5 lg:grid-cols-[minmax(0,1fr)_420px]">
|
||||
<form method="POST" action="{{ route('admin.data.mahasiswa.import.store') }}" enctype="multipart/form-data" class="rounded-xl border border-[#E5E7EB] bg-white p-6 shadow-[0_8px_12px_rgba(13,10,44,0.04)]">
|
||||
@csrf
|
||||
<div class="grid gap-5">
|
||||
<div>
|
||||
<label class="text-sm font-semibold text-[#15171A]">File CSV</label>
|
||||
<input type="file" name="csv" accept=".csv,text/csv,text/plain" class="mt-2 w-full rounded-md border border-[#D1D5DB] px-4 py-3 text-sm" required>
|
||||
<p class="mt-2 text-xs leading-5 text-[#6B7280]">Maksimal 5 MB. Baris pertama harus berisi header.</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="text-sm font-semibold text-[#15171A]">Mode Import</label>
|
||||
<select name="mode" class="mt-2 w-full rounded-md border border-[#D1D5DB] px-4 py-3 text-sm">
|
||||
<option value="insert_only">Tambah data baru saja</option>
|
||||
<option value="upsert">Tambah dan update jika NIM sudah ada</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="text-sm font-semibold text-[#15171A]">Password Default</label>
|
||||
<input type="text" name="default_password" value="123456" class="mt-2 w-full rounded-md border border-[#D1D5DB] px-4 py-3 text-sm">
|
||||
<p class="mt-2 text-xs leading-5 text-[#6B7280]">Dipakai jika kolom `password` kosong atau tidak ada pada baris mahasiswa baru.</p>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-wrap gap-3 border-t border-[#E5E7EB] pt-5">
|
||||
<button class="rounded-md bg-[#15171A] px-5 py-2.5 text-sm font-medium text-white hover:opacity-90">Import CSV</button>
|
||||
<a href="{{ route('admin.data.mahasiswa', [], false) }}" class="rounded-md border border-[#D1D5DB] bg-white px-5 py-2.5 text-sm font-medium text-[#15171A] hover:bg-[#F9FAFB]">Batal</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<aside class="space-y-5">
|
||||
<section class="rounded-xl border border-[#E5E7EB] bg-white p-5 shadow-[0_8px_12px_rgba(13,10,44,0.04)]">
|
||||
<h2 class="text-lg font-semibold text-[#15171A]">Format Header</h2>
|
||||
<p class="mt-3 text-sm leading-7 text-[#6B7280]">Header wajib:</p>
|
||||
<div class="mt-3 flex flex-wrap gap-2">
|
||||
@foreach ($requiredHeaders as $header)
|
||||
<span class="rounded-full bg-[#625DF5]/10 px-3 py-1 text-xs font-semibold text-[#625DF5]">{{ $header }}</span>
|
||||
@endforeach
|
||||
</div>
|
||||
<p class="mt-5 text-sm leading-7 text-[#6B7280]">Header opsional:</p>
|
||||
<div class="mt-3 flex flex-wrap gap-2">
|
||||
@foreach ($optionalHeaders as $header)
|
||||
<span class="rounded-full bg-[#F9FAFB] px-3 py-1 text-xs font-semibold text-[#4B5563]">{{ $header }}</span>
|
||||
@endforeach
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="rounded-xl border border-[#E5E7EB] bg-white p-5 shadow-[0_8px_12px_rgba(13,10,44,0.04)]">
|
||||
<h2 class="text-lg font-semibold text-[#15171A]">Contoh CSV</h2>
|
||||
<pre class="mt-4 overflow-x-auto rounded-lg bg-[#15171A] p-4 text-xs leading-6 text-white"><code>nim,nama,email,thnmasuk,password,status,noHP,noHPOrtu,bolehUploadDraft
|
||||
D1041231001,Budi Saputra,budi@example.com,2023,123456,A,08123456789,08129876543,1
|
||||
D1041231002,Siti Aminah,siti@example.com,2023,,A,,,1</code></pre>
|
||||
</section>
|
||||
</aside>
|
||||
</div>
|
||||
</x-admin.partials.page-shell>
|
||||
@@ -0,0 +1,68 @@
|
||||
<x-admin.partials.page-shell :title="$title" :sidebar="$sidebar">
|
||||
<section class="rounded-xl bg-white p-4 shadow-[0_8px_12px_rgba(13,10,44,0.04)] lg:p-6">
|
||||
<div class="flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between">
|
||||
<div>
|
||||
<ol class="flex flex-wrap items-center gap-2 text-sm text-[#6B7280]">
|
||||
<li class="inline-flex items-center gap-2">
|
||||
<span class="text-[#625DF5]">@include('dashboard.partials.icon', ['icon' => 'home'])</span>
|
||||
<span>Home</span>
|
||||
</li>
|
||||
<li>/</li>
|
||||
<li class="font-medium text-[#15171A]">{{ $pageTitle }}</li>
|
||||
</ol>
|
||||
<h1 class="mt-4 text-[26px] font-bold leading-[34px] text-[#15171A]">{{ $pageTitle }}</h1>
|
||||
<p class="mt-2 max-w-[880px] text-sm leading-7 text-[#4B5563]">{{ $pageDescription }}</p>
|
||||
</div>
|
||||
<div class="flex flex-wrap items-center gap-3">
|
||||
<div class="rounded-md border border-[#E5E7EB] bg-[#F9FAFB] px-4 py-3 text-sm text-[#15171A]">{{ $pageDate }}</div>
|
||||
<div class="rounded-md border border-[#E5E7EB] bg-[#F9FAFB] px-4 py-3 text-sm text-[#15171A]">{{ $user['username'] }} · {{ $user['nmprodi'] }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="rounded-xl border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-800">
|
||||
<p class="font-semibold">Form belum bisa disimpan.</p>
|
||||
<ul class="mt-2 list-disc space-y-1 pl-5">
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<form method="POST" action="{{ route('admin.pengumuman.store') }}" class="rounded-xl border border-[#E5E7EB] bg-white p-6 shadow-[0_8px_12px_rgba(13,10,44,0.04)]">
|
||||
@csrf
|
||||
<div class="grid gap-5">
|
||||
<div>
|
||||
<label class="text-sm font-semibold text-[#15171A]">Judul</label>
|
||||
<input name="judul" value="{{ old('judul') }}" class="mt-2 w-full rounded-md border border-[#D1D5DB] px-4 py-3 text-sm focus:border-[#625DF5] focus:outline-none" required>
|
||||
</div>
|
||||
<div>
|
||||
<label class="text-sm font-semibold text-[#15171A]">Isi Pengumuman</label>
|
||||
<textarea name="isi" rows="8" class="mt-2 w-full rounded-md border border-[#D1D5DB] px-4 py-3 text-sm focus:border-[#625DF5] focus:outline-none" required>{{ old('isi') }}</textarea>
|
||||
</div>
|
||||
<div class="grid gap-5 lg:grid-cols-2">
|
||||
<div>
|
||||
<label class="text-sm font-semibold text-[#15171A]">Tujuan</label>
|
||||
<select name="tujuan" class="mt-2 w-full rounded-md border border-[#D1D5DB] px-4 py-3 text-sm">
|
||||
<option value="A" @selected(old('tujuan', 'A') === 'A')>Semua</option>
|
||||
<option value="M" @selected(old('tujuan') === 'M')>Mahasiswa</option>
|
||||
<option value="D" @selected(old('tujuan') === 'D')>Dosen</option>
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label class="text-sm font-semibold text-[#15171A]">Publish</label>
|
||||
<select name="publish" class="mt-2 w-full rounded-md border border-[#D1D5DB] px-4 py-3 text-sm">
|
||||
<option value="Y" @selected(old('publish', 'Y') === 'Y')>Ya</option>
|
||||
<option value="N" @selected(old('publish') === 'N')>Tidak</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-3 border-t border-[#E5E7EB] pt-5">
|
||||
<button class="rounded-md bg-[#15171A] px-5 py-2.5 text-sm font-medium text-white hover:opacity-90">Simpan Pengumuman</button>
|
||||
<a href="{{ route('admin.pengumuman.index', [], false) }}" class="rounded-md border border-[#D1D5DB] bg-white px-5 py-2.5 text-sm font-medium text-[#15171A] hover:bg-[#F9FAFB]">Batal</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</x-admin.partials.page-shell>
|
||||
59
rebuild/resources/views/admin/pages/resource-form.blade.php
Normal file
59
rebuild/resources/views/admin/pages/resource-form.blade.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<x-admin.partials.page-shell :title="$title" :sidebar="$sidebar">
|
||||
<section class="rounded-xl bg-white p-4 shadow-[0_8px_12px_rgba(13,10,44,0.04)] lg:p-6">
|
||||
<div class="flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between">
|
||||
<div>
|
||||
<ol class="flex flex-wrap items-center gap-2 text-sm text-[#6B7280]">
|
||||
<li class="inline-flex items-center gap-2"><span class="text-[#625DF5]">@include('dashboard.partials.icon', ['icon' => 'home'])</span><span>Home</span></li>
|
||||
<li>/</li>
|
||||
<li class="font-medium text-[#15171A]">{{ $pageTitle }}</li>
|
||||
</ol>
|
||||
<h1 class="mt-4 text-[26px] font-bold leading-[34px] text-[#15171A]">{{ $pageTitle }}</h1>
|
||||
<p class="mt-2 max-w-[880px] text-sm leading-7 text-[#4B5563]">{{ $pageDescription }}</p>
|
||||
</div>
|
||||
<div class="rounded-md border border-[#E5E7EB] bg-[#F9FAFB] px-4 py-3 text-sm text-[#15171A]">{{ $user['username'] }} · {{ $user['nmprodi'] }}</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="rounded-xl border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-800">
|
||||
<p class="font-semibold">Form belum bisa disimpan.</p>
|
||||
<ul class="mt-2 list-disc space-y-1 pl-5">
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<form method="POST" action="{{ $action }}" class="rounded-xl border border-[#E5E7EB] bg-white p-6 shadow-[0_8px_12px_rgba(13,10,44,0.04)]">
|
||||
@csrf
|
||||
@if (($method ?? 'POST') !== 'POST')
|
||||
@method($method)
|
||||
@endif
|
||||
<div class="grid gap-5 lg:grid-cols-2">
|
||||
@foreach ($fields as $field)
|
||||
<div class="{{ ($field['type'] ?? 'text') === 'textarea' ? 'lg:col-span-2' : '' }}">
|
||||
<label class="text-sm font-semibold text-[#15171A]">{{ $field['label'] }}</label>
|
||||
@if (($field['type'] ?? 'text') === 'select')
|
||||
<select name="{{ $field['name'] }}" class="mt-2 w-full rounded-md border border-[#D1D5DB] px-4 py-3 text-sm">
|
||||
@foreach ($field['options'] as $value => $label)
|
||||
<option value="{{ $value }}" @selected((string) old($field['name'], $field['value'] ?? '') === (string) $value)>{{ $label }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@elseif (($field['type'] ?? 'text') === 'textarea')
|
||||
<textarea name="{{ $field['name'] }}" rows="7" class="mt-2 w-full rounded-md border border-[#D1D5DB] px-4 py-3 text-sm focus:border-[#625DF5] focus:outline-none">{{ old($field['name'], $field['value'] ?? '') }}</textarea>
|
||||
@else
|
||||
<input type="{{ $field['type'] ?? 'text' }}" name="{{ $field['name'] }}" value="{{ old($field['name'], $field['value'] ?? '') }}" class="mt-2 w-full rounded-md border border-[#D1D5DB] px-4 py-3 text-sm focus:border-[#625DF5] focus:outline-none" @if(!empty($field['required'])) required @endif>
|
||||
@endif
|
||||
@if (!empty($field['help']))
|
||||
<p class="mt-2 text-xs leading-5 text-[#6B7280]">{{ $field['help'] }}</p>
|
||||
@endif
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="mt-6 flex flex-wrap gap-3 border-t border-[#E5E7EB] pt-5">
|
||||
<button class="rounded-md bg-[#15171A] px-5 py-2.5 text-sm font-medium text-white hover:opacity-90">Simpan</button>
|
||||
<a href="{{ $cancel }}" class="rounded-md border border-[#D1D5DB] bg-white px-5 py-2.5 text-sm font-medium text-[#15171A] hover:bg-[#F9FAFB]">Batal</a>
|
||||
</div>
|
||||
</form>
|
||||
</x-admin.partials.page-shell>
|
||||
101
rebuild/resources/views/admin/pages/table.blade.php
Normal file
101
rebuild/resources/views/admin/pages/table.blade.php
Normal file
@@ -0,0 +1,101 @@
|
||||
<x-admin.partials.page-shell :title="$title" :sidebar="$sidebar">
|
||||
<section class="rounded-xl bg-white p-4 shadow-[0_8px_12px_rgba(13,10,44,0.04)] lg:p-6">
|
||||
<div class="flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between">
|
||||
<div>
|
||||
<ol class="flex flex-wrap items-center gap-2 text-sm text-[#6B7280]">
|
||||
<li class="inline-flex items-center gap-2">
|
||||
<span class="text-[#625DF5]">@include('dashboard.partials.icon', ['icon' => 'home'])</span>
|
||||
<span>Home</span>
|
||||
</li>
|
||||
<li>/</li>
|
||||
<li class="font-medium text-[#15171A]">{{ $pageTitle }}</li>
|
||||
</ol>
|
||||
<h1 class="mt-4 text-[26px] font-bold leading-[34px] text-[#15171A]">{{ $pageTitle }}</h1>
|
||||
<p class="mt-2 max-w-[880px] text-sm leading-7 text-[#4B5563]">{{ $pageDescription }}</p>
|
||||
</div>
|
||||
<div class="flex flex-wrap items-center gap-3">
|
||||
<div class="rounded-md border border-[#E5E7EB] bg-[#F9FAFB] px-4 py-3 text-sm text-[#15171A]">{{ $pageDate }}</div>
|
||||
<div class="rounded-md border border-[#E5E7EB] bg-[#F9FAFB] px-4 py-3 text-sm text-[#15171A]">{{ $user['username'] }} · {{ $user['nmprodi'] }}</div>
|
||||
<form method="POST" action="{{ route('legacy.logout') }}">
|
||||
@csrf
|
||||
<button type="submit" class="rounded-md bg-[#15171A] px-5.5 py-2.5 text-sm font-medium text-white hover:opacity-90">Logout</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (!empty($actions ?? []))
|
||||
<div class="mt-5 flex flex-wrap gap-3 border-t border-[#E5E7EB] pt-5">
|
||||
@foreach ($actions as $action)
|
||||
<a href="{{ $action['href'] }}" class="{{ ($action['variant'] ?? 'light') === 'dark' ? 'rounded-md bg-[#15171A] px-4 py-2.5 text-sm font-medium text-white hover:opacity-90' : 'rounded-md border border-[#D1D5DB] bg-white px-4 py-2.5 text-sm font-medium text-[#15171A] hover:bg-[#F9FAFB]' }}">{{ $action['label'] }}</a>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
</section>
|
||||
|
||||
@if (session('success'))
|
||||
<div class="rounded-xl border border-emerald-200 bg-emerald-50 px-4 py-3 text-sm text-emerald-800">{{ session('success') }}</div>
|
||||
@endif
|
||||
|
||||
@if (!empty($search ?? false))
|
||||
<form method="GET" class="rounded-xl border border-[#E5E7EB] bg-white p-5 shadow-[0_8px_12px_rgba(13,10,44,0.04)]">
|
||||
<div class="grid gap-3 lg:grid-cols-[minmax(0,1fr)_auto]">
|
||||
<input name="q" value="{{ $keyword ?? '' }}" placeholder="Cari judul, nama mahasiswa, atau NIM" class="rounded-md border border-[#D1D5DB] px-4 py-3 text-sm focus:border-[#625DF5] focus:outline-none">
|
||||
<button type="submit" class="rounded-md bg-[#15171A] px-5 py-3 text-sm font-medium text-white hover:opacity-90">Cari</button>
|
||||
</div>
|
||||
</form>
|
||||
@endif
|
||||
|
||||
<section class="overflow-hidden rounded-xl border border-[#E5E7EB] bg-white shadow-[0_8px_12px_rgba(13,10,44,0.04)]">
|
||||
<div class="overflow-x-auto">
|
||||
<table class="min-w-[900px] w-full text-left text-sm">
|
||||
<thead class="bg-[#F9FAFB] text-xs uppercase tracking-[0.12em] text-[#6B7280]">
|
||||
<tr>
|
||||
<th class="px-4 py-3">No.</th>
|
||||
@foreach ($columns as $column)
|
||||
<th class="px-4 py-3">{{ $column }}</th>
|
||||
@endforeach
|
||||
@if (!empty($rowActions ?? null))
|
||||
<th class="px-4 py-3 text-right">Aksi</th>
|
||||
@endif
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-[#E5E7EB]">
|
||||
@forelse ($rows as $row)
|
||||
<tr>
|
||||
<td class="px-4 py-4 text-[#6B7280]">{{ method_exists($rows, 'currentPage') ? $loop->iteration + ($rows->currentPage() - 1) * $rows->perPage() : $loop->iteration }}</td>
|
||||
@foreach ($map($row) as $value)
|
||||
<td class="px-4 py-4 text-[#374151]">{!! is_string($value) ? e($value) : $value !!}</td>
|
||||
@endforeach
|
||||
@if (!empty($rowActions ?? null))
|
||||
<td class="px-4 py-4">
|
||||
<div class="flex justify-end gap-2 whitespace-nowrap">
|
||||
@foreach ($rowActions($row) as $action)
|
||||
@if (($action['method'] ?? 'GET') === 'GET')
|
||||
<a href="{{ $action['href'] }}" class="rounded-md border border-[#D1D5DB] px-3 py-2 text-xs font-medium text-[#15171A] hover:bg-[#F9FAFB]">{{ $action['label'] }}</a>
|
||||
@else
|
||||
<form method="POST" action="{{ $action['href'] }}" onsubmit="return confirm('{{ $action['confirm'] ?? 'Lanjutkan aksi ini?' }}')">
|
||||
@csrf
|
||||
@method($action['method'])
|
||||
<button class="rounded-md bg-rose-600 px-3 py-2 text-xs font-medium text-white hover:opacity-90">{{ $action['label'] }}</button>
|
||||
</form>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="{{ count($columns) + 1 + (!empty($rowActions ?? null) ? 1 : 0) }}" class="px-4 py-8 text-center text-[#6B7280]">Belum ada data.</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@if (method_exists($rows, 'links'))
|
||||
<div class="border-t border-[#E5E7EB] px-4 py-3">
|
||||
{{ $rows->links() }}
|
||||
</div>
|
||||
@endif
|
||||
</section>
|
||||
</x-admin.partials.page-shell>
|
||||
Reference in New Issue
Block a user