@extends('layouts.admin') @section('title','Kegiatan') @section('page_title','Agenda & Kegiatan') @section('page_subtitle','Kalender kegiatan MWCNU, Ranting, Banom dan Lembaga')
@section('content')
<div class="grid form-grid"><form class="card form" method="post" enctype="multipart/form-data" action="{{ route('activities.store') }}">@csrf<h3>Tambah Kegiatan</h3><label>Unit<select name="organization_id">@foreach($orgs as $o)<option value="{{ $o->id }}">{{ $o->acronym ?: $o->name }}</option>@endforeach</select></label><div class="two"><label>Nama kegiatan<input name="title" required></label><label>Jenis<input name="type" placeholder="Rapat / Turba / Kaderisasi"></label></div><label>Deskripsi<textarea name="description" rows="3"></textarea></label><div class="two"><label>Mulai<input type="datetime-local" name="start_at"></label><label>Selesai<input type="datetime-local" name="end_at"></label></div><div class="two"><label>Lokasi<input name="location"></label><label>Anggaran<input type="number" name="budget" min="0"></label></div><div class="two"><label>Latitude<input name="latitude" placeholder="-6.98"></label><label>Longitude<input name="longitude" placeholder="110.34"></label></div><label>Foto<input type="file" name="featured_image" accept="image/*"></label><div class="toggle-grid"><label><input type="checkbox" name="public_visible" value="1" checked> Tampil publik</label><label><input type="checkbox" name="aggregate_to_main" value="1" checked> Tampil di portal MWCNU</label></div><label>Status<select name="status"><option value="planned">Direncanakan</option><option value="running">Berjalan</option><option value="done">Selesai</option><option value="cancelled">Batal</option></select></label><button class="btn primary">Simpan Kegiatan</button></form><div class="card tip"><h3>Terintegrasi</h3><p>Kegiatan dapat digunakan untuk agenda publik dan menjadi sumber pembuatan link presensi.</p></div></div>
<div class="card table-card"><div class="table-wrap"><table><thead><tr><th>Kegiatan</th><th>Unit</th><th>Waktu</th><th>Lokasi</th><th>Status</th></tr></thead><tbody>@foreach($activities as $a)<tr><td><b>{{ $a->title }}</b><small>{{ $a->type }}</small></td><td>{{ $a->organization?->acronym }}</td><td>{{ $a->start_at?->format('d M Y H:i') }}</td><td>{{ $a->location }}</td><td><span class="pill">{{ $a->status }}</span></td></tr>@endforeach</tbody></table></div>{{ $activities->links() }}</div>
@endsection
