pengukuran ibu hamil
This commit is contained in:
parent
490a537091
commit
812fdc6e06
|
|
@ -12,8 +12,8 @@ class AnakController extends Controller
|
||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$anak = Anak::latest()->get();
|
$balita = Anak::latest()->get();
|
||||||
return view('balita.data-balita', compact('anak'));
|
return view('balita.data-balita', compact('balita'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -30,61 +30,54 @@ public function create()
|
||||||
*/
|
*/
|
||||||
public function store(Request $request)
|
public function store(Request $request)
|
||||||
{
|
{
|
||||||
$request->validate([
|
Anak::create([
|
||||||
'nik' => 'required|unique:anak',
|
'nik' => $request->nik,
|
||||||
'nama' => 'required',
|
'nama' => $request->nama,
|
||||||
'jenis_kelamin' => 'required',
|
'jenis_kelamin' => $request->jenis_kelamin,
|
||||||
'tanggal_lahir' => 'required|date',
|
'tgl_lahir' => $request->tgl_lahir,
|
||||||
]);
|
'nama_ortu' => $request->nama_ortu,
|
||||||
|
'alamat' => $request->alamat
|
||||||
|
]);
|
||||||
|
|
||||||
Anak::create($request->all());
|
return redirect()->route('balita.index')->with('success','Data berhasil ditambahkan');
|
||||||
|
|
||||||
return redirect()->route('balita.data-balita')
|
|
||||||
->with('success', 'Data balita berhasil ditambahkan');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display the specified resource.
|
|
||||||
*/
|
|
||||||
public function show(string $id)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the form for editing the specified resource.
|
* Show the form for editing the specified resource.
|
||||||
*/
|
*/
|
||||||
public function edit(Anak $anak)
|
public function edit($id)
|
||||||
{
|
{
|
||||||
return view('balita.edit', compact('anak'));
|
$balita = Anak::findOrFail($id);
|
||||||
|
return view('balita.edit', compact('balita'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update the specified resource in storage.
|
* Update the specified resource in storage.
|
||||||
*/
|
*/
|
||||||
public function update(Request $request, Anak $anak)
|
public function update(Request $request, $id)
|
||||||
{
|
{
|
||||||
$request->validate([
|
$balita = Anak::findOrFail($id);
|
||||||
'nik' => 'required|unique:anak,nik,' . $anak->id,
|
|
||||||
'nama' => 'required',
|
$balita->update([
|
||||||
'jenis_kelamin' => 'required',
|
'nik' => $request->nik,
|
||||||
'tanggal_lahir' => 'required|date',
|
'nama' => $request->nama,
|
||||||
|
'jenis_kelamin' => $request->jenis_kelamin,
|
||||||
|
'tgl_lahir' => $request->tgl_lahir,
|
||||||
|
'nama_ortu' => $request->nama_ortu,
|
||||||
|
'alamat' => $request->alamat
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$anak->update($request->all());
|
return redirect()->route('balita.index')->with('success','Data berhasil diupdate');
|
||||||
|
|
||||||
return redirect()->route('balita.data-balita')
|
|
||||||
->with('success', 'Data balita berhasil diperbarui');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove the specified resource from storage.
|
* Remove the specified resource from storage.
|
||||||
*/
|
*/
|
||||||
public function destroy(Anak $anak)
|
public function destroy($id)
|
||||||
{
|
{
|
||||||
$anak->delete();
|
$balita = Anak::findOrFail($id);
|
||||||
|
$balita->delete();
|
||||||
|
|
||||||
return redirect()->route('anak.index')
|
return redirect()->route('balita.index')->with('success','Data berhasil dihapus');
|
||||||
->with('success', 'Data anak berhasil dihapus');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,13 +3,40 @@
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
|
||||||
class AuthController extends Controller
|
class AuthController extends Controller
|
||||||
{
|
{
|
||||||
public function showRegister() {
|
public function login(Request $request)
|
||||||
return view('login-register.register');
|
{
|
||||||
|
$data = [
|
||||||
|
'email' => $request->email,
|
||||||
|
'password' => $request->password
|
||||||
|
];
|
||||||
|
|
||||||
|
if (Auth::attempt($data)) {
|
||||||
|
|
||||||
|
if (auth()->user()->role == 'admin') {
|
||||||
|
return redirect('/dashboard');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (auth()->user()->role == 'petugas') {
|
||||||
|
return redirect('/dashboard');
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
return back()->with('error', 'Email atau password salah');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public function showLogin() {
|
|
||||||
return view('login-register.login');
|
public function logout(Request $request)
|
||||||
|
{
|
||||||
|
Auth::logout(); // Menghapus autentikasi user
|
||||||
|
|
||||||
|
$request->session()->invalidate(); // Menghapus semua data session
|
||||||
|
$request->session()->regenerateToken(); // Mencegah serangan CSRF
|
||||||
|
|
||||||
|
return redirect('/login')->with('success', 'Anda telah berhasil keluar.');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Models\Anak;
|
||||||
|
use App\Models\IbuHamil;
|
||||||
|
use App\Models\User;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
|
class DashboardController extends Controller
|
||||||
|
{
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$total_ibu_hamil = IbuHamil::count();
|
||||||
|
$total_balita = Anak::count();
|
||||||
|
$total_petugas = User::count();
|
||||||
|
|
||||||
|
$grafik = IbuHamil::select(
|
||||||
|
DB::raw('MONTH(created_at) as bulan'),
|
||||||
|
DB::raw('count(*) as total')
|
||||||
|
)
|
||||||
|
->groupBy('bulan')
|
||||||
|
->orderBy('bulan')
|
||||||
|
->get();
|
||||||
|
|
||||||
|
return view('dashboard.index', compact( 'total_ibu_hamil', 'total_balita', 'total_petugas', 'grafik'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,91 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Models\Edukasi;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class EdukasiController extends Controller
|
||||||
|
{
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$t_edukasi = Edukasi::latest()->get();
|
||||||
|
return view('edukasi.edukasi', compact('t_edukasi'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for creating a new resource.
|
||||||
|
*/
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
return view('edukasi.create');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Store a newly created resource in storage.
|
||||||
|
*/
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
if ($request->hasFile('gambar')) {
|
||||||
|
$gambar = $request->file('gambar')->store('edukasi', 'public');
|
||||||
|
} else {
|
||||||
|
$gambar = null;
|
||||||
|
}
|
||||||
|
Edukasi::create([
|
||||||
|
'judul' => $request->judul,
|
||||||
|
'konten' => $request->konten,
|
||||||
|
'kategori' => $request->kategori,
|
||||||
|
'gambar' => $gambar
|
||||||
|
]);
|
||||||
|
|
||||||
|
return redirect()->route('edukasi.index')->with('success','Data berhasil ditambahkan');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for editing the specified resource.
|
||||||
|
*/
|
||||||
|
public function edit($id)
|
||||||
|
{
|
||||||
|
$t_edukasi = Edukasi::findOrFail($id);
|
||||||
|
return view('edukasi.edit', compact('t_edukasi'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the specified resource in storage.
|
||||||
|
*/
|
||||||
|
public function update(Request $request, $id)
|
||||||
|
{
|
||||||
|
$t_edukasi = Edukasi::findOrFail($id);
|
||||||
|
|
||||||
|
if ($request->hasFile('gambar')) {
|
||||||
|
|
||||||
|
$gambar = $request->file('gambar')->store('edukasi','public');
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
$gambar = $t_edukasi->gambar;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$t_edukasi->update([
|
||||||
|
'judul' => $request->judul,
|
||||||
|
'konten' => $request->konten,
|
||||||
|
'kategori' => $request->kategori,
|
||||||
|
'gambar' => $gambar
|
||||||
|
]);
|
||||||
|
|
||||||
|
return redirect()->route('edukasi.index')->with('success','Data berhasil diupdate');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the specified resource from storage.
|
||||||
|
*/
|
||||||
|
public function destroy($id)
|
||||||
|
{
|
||||||
|
$t_edukasi = Edukasi::findOrFail($id);
|
||||||
|
$t_edukasi->delete();
|
||||||
|
|
||||||
|
return redirect()->route('edukasi.index')->with('success','Data berhasil dihapus');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Models\IbuHamil;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class IbuHamilController extends Controller
|
||||||
|
{
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$ibu_hamil = IbuHamil::latest()->get();
|
||||||
|
return view('ibu_hamil.data-ibuhamil', compact('ibu_hamil'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
return view('ibu_hamil.create');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
IbuHamil::create([
|
||||||
|
'nik' => $request->nik,
|
||||||
|
'nama' => $request->nama,
|
||||||
|
'tgl_lahir' => $request->tgl_lahir,
|
||||||
|
'alamat' => $request->alamat,
|
||||||
|
'no_hp' => $request->no_hp
|
||||||
|
]);
|
||||||
|
|
||||||
|
return redirect()->route('ibu_hamil.index')->with('success','Data berhasil ditambahkan');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function edit($id)
|
||||||
|
{
|
||||||
|
$ibu_hamil = IbuHamil::findOrFail($id);
|
||||||
|
return view('ibu_hamil.edit', compact('ibu_hamil'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function update(Request $request, $id)
|
||||||
|
{
|
||||||
|
$ibu_hamil = IbuHamil::findOrFail($id);
|
||||||
|
|
||||||
|
$ibu_hamil->update([
|
||||||
|
'nik' => $request->nik,
|
||||||
|
'nama' => $request->nama,
|
||||||
|
'tgl_lahir' => $request->tgl_lahir,
|
||||||
|
'alamat' => $request->alamat,
|
||||||
|
'no_hp' => $request->no_hp
|
||||||
|
]);
|
||||||
|
|
||||||
|
return redirect()->route('ibu_hamil.index')->with('success','Data berhasil diupdate');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function destroy($id)
|
||||||
|
{
|
||||||
|
$ibu_hamil = IbuHamil::findOrFail($id);
|
||||||
|
$ibu_hamil->delete();
|
||||||
|
|
||||||
|
return redirect()->route('ibu_hamil.index')->with('success','Data berhasil dihapus');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Models\PengukuranBalita;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class PengukuranBalitaController extends Controller
|
||||||
|
{
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
|
||||||
|
$p_balita = PengukuranBalita::with(['balita','petugas'])->get();
|
||||||
|
|
||||||
|
// $ibu->usia = Carbon::parse($ibu->tgl_lahir)->age;
|
||||||
|
// return $ibu;
|
||||||
|
return view('pengukuran_balita.data', compact('p_balita'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,153 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Barryvdh\DomPDF\Facade\Pdf;
|
||||||
|
use App\Models\Edukasi;
|
||||||
|
use App\Models\Edukasi2;
|
||||||
|
use App\Models\IbuHamil;
|
||||||
|
use App\Models\PengukuranIbuHamil;
|
||||||
|
use Carbon\Carbon;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
|
|
||||||
|
class PengukuranIbuHamilController extends Controller
|
||||||
|
{
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
|
||||||
|
$p_ibuhamil = PengukuranIbuHamil::with(['ibuHamil','petugas'])->get();
|
||||||
|
|
||||||
|
// $ibu->usia = Carbon::parse($ibu->tgl_lahir)->age;
|
||||||
|
// return $ibu;
|
||||||
|
return view('pengukuran_ibuhamil.data', compact('p_ibuhamil'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
$ibu_hamil = IbuHamil::all();
|
||||||
|
|
||||||
|
return view('pengukuran_ibuhamil.create', compact('ibu_hamil'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
$request->validate([
|
||||||
|
'ibu_hamil_id' => 'required|exists:ibu_hamil,id',
|
||||||
|
'berat_badan' => 'required|numeric',
|
||||||
|
'tinggi_badan' => 'required|numeric',
|
||||||
|
'lila' => 'nullable|numeric',
|
||||||
|
'usia_kehamilan' => 'required|integer',
|
||||||
|
]);
|
||||||
|
|
||||||
|
DB::transaction(function () use ($request) {
|
||||||
|
|
||||||
|
// Hitung IMT
|
||||||
|
$tb_meter = $request->tinggi_badan / 100;
|
||||||
|
|
||||||
|
if ($tb_meter <= 0) {
|
||||||
|
$imt = 0;
|
||||||
|
} else {
|
||||||
|
$imt = $request->berat_badan / ($tb_meter * $tb_meter);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Status Gizi
|
||||||
|
if ($imt < 18.5) {
|
||||||
|
$status_gizi = 'ibu hamil gizi kurang';
|
||||||
|
} elseif ($imt <= 24.9) {
|
||||||
|
$status_gizi = 'ibu hamil gizi normal';
|
||||||
|
} elseif ($imt <= 29.9) {
|
||||||
|
$status_gizi = 'ibu hamil gizi lebih';
|
||||||
|
} else {
|
||||||
|
$status_gizi = 'ibu hamil obesitas';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Simpan Pengukuran
|
||||||
|
$pengukuran = PengukuranIbuHamil::create([
|
||||||
|
'ibu_hamil_id' => $request->ibu_hamil_id,
|
||||||
|
'user_id' => Auth::id(),
|
||||||
|
'tanggal' => now(),
|
||||||
|
'berat_badan' => $request->berat_badan,
|
||||||
|
'tinggi_badan' => $request->tinggi_badan,
|
||||||
|
'lila' => $request->lila,
|
||||||
|
'usia_kehamilan' => $request->usia_kehamilan,
|
||||||
|
'imt' => round($imt,2),
|
||||||
|
'status_gizi' => $status_gizi,
|
||||||
|
]);
|
||||||
|
|
||||||
|
// Ambil Template Edukasi
|
||||||
|
$template = Edukasi::where('kategori', $status_gizi)->get();
|
||||||
|
|
||||||
|
// Simpan Edukasi Hasil
|
||||||
|
foreach ($template as $item) {
|
||||||
|
|
||||||
|
Edukasi2::create([
|
||||||
|
'ibu_hamil_id' => $request->ibu_hamil_id,
|
||||||
|
'pengukuran_ibu_hamil_id' => $pengukuran->id,
|
||||||
|
'judul' => $item->judul,
|
||||||
|
'konten' => $item->konten,
|
||||||
|
'kategori' => $status_gizi
|
||||||
|
]);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
return redirect()->route('pengukuran_ibu_hamil.index')
|
||||||
|
->with('success','Hasil pemeriksaan dan edukasi berhasil disimpan!');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function destroy($id)
|
||||||
|
{
|
||||||
|
$p_ibuhamil = PengukuranIbuHamil::findOrFail($id);
|
||||||
|
$p_ibuhamil->delete();
|
||||||
|
|
||||||
|
return redirect()->route('pengukuran_ibu_hamil.index')->with('success','Data berhasil dihapus');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function detail($id)
|
||||||
|
{
|
||||||
|
// ambil pengukuran yang dipilih
|
||||||
|
$pengukuran = PengukuranIbuHamil::with('ibuHamil')->findOrFail($id);
|
||||||
|
|
||||||
|
// ambil semua riwayat pengukuran ibu tersebut
|
||||||
|
$pengukurans = PengukuranIbuHamil::where('ibu_hamil_id', $pengukuran->ibu_hamil_id)
|
||||||
|
->orderBy('tanggal','asc')
|
||||||
|
->get();
|
||||||
|
|
||||||
|
// ambil edukasi
|
||||||
|
$edukasi = Edukasi2::where('pengukuran_ibu_hamil_id', $id)->get();
|
||||||
|
|
||||||
|
// data untuk grafik
|
||||||
|
$tanggal = $pengukurans->pluck('tanggal');
|
||||||
|
$bb = $pengukurans->pluck('berat_badan');
|
||||||
|
$imt = $pengukurans->pluck('imt');
|
||||||
|
|
||||||
|
return view('pengukuran_ibuhamil.detail', compact(
|
||||||
|
'pengukuran',
|
||||||
|
'pengukurans',
|
||||||
|
'edukasi',
|
||||||
|
'tanggal',
|
||||||
|
'bb',
|
||||||
|
'imt'
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function cetakPdf(Request $request, $id)
|
||||||
|
{
|
||||||
|
$pengukuran = PengukuranIbuHamil::with(['petugas','ibuHamil'])->findOrFail($id);
|
||||||
|
$edukasi = Edukasi2::where('pengukuran_ibu_hamil_id', $id)->get();
|
||||||
|
$chartImage = $request->chartImage;
|
||||||
|
|
||||||
|
$pdf = \Barryvdh\DomPDF\Facade\Pdf::loadView(
|
||||||
|
'pdf.hasil_ibu_hamil',
|
||||||
|
compact('pengukuran','edukasi','chartImage')
|
||||||
|
);
|
||||||
|
|
||||||
|
return $pdf->download('laporan_ibu_hamil.pdf');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,84 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Models\User;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class UsersController extends Controller
|
||||||
|
{
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$user = User::latest()->get();
|
||||||
|
return view('users.users', compact('user'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for creating a new resource.
|
||||||
|
*/
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
return view('users.create');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Store a newly created resource in storage.
|
||||||
|
*/
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
User::create([
|
||||||
|
'nama' => $request->nama,
|
||||||
|
'no_hp' => $request->no_hp,
|
||||||
|
'email' => $request->email,
|
||||||
|
'password' => bcrypt($request->password),
|
||||||
|
'role' => $request->role
|
||||||
|
|
||||||
|
]);
|
||||||
|
|
||||||
|
return redirect()->route('users.index')->with('success','Data berhasil ditambahkan');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for editing the specified resource.
|
||||||
|
*/
|
||||||
|
public function edit($id)
|
||||||
|
{
|
||||||
|
$user = User::findOrFail($id);
|
||||||
|
return view('users.edit', compact('user'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the specified resource in storage.
|
||||||
|
*/
|
||||||
|
public function update(Request $request, $id)
|
||||||
|
{
|
||||||
|
$user = User::findOrFail($id);
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'nama' => $request->nama,
|
||||||
|
'no_hp' => $request->no_hp,
|
||||||
|
'email' => $request->email,
|
||||||
|
'role' => $request->role
|
||||||
|
];
|
||||||
|
|
||||||
|
if ($request->password) {
|
||||||
|
$data['password'] = bcrypt($request->password);
|
||||||
|
}
|
||||||
|
|
||||||
|
$user->update($data);
|
||||||
|
|
||||||
|
return redirect()->route('users.index')->with('success','Data berhasil diupdate');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the specified resource from storage.
|
||||||
|
*/
|
||||||
|
public function destroy($id)
|
||||||
|
{
|
||||||
|
$user = User::findOrFail($id);
|
||||||
|
$user->delete();
|
||||||
|
|
||||||
|
return redirect()->route('users.index')->with('success','Data berhasil dihapus');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -65,4 +65,9 @@ class Kernel extends HttpKernel
|
||||||
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
||||||
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
|
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
protected $routeMiddleware = [
|
||||||
|
'auth' => \App\Http\Middleware\Authenticate::class,
|
||||||
|
'role' => \App\Http\Middleware\RoleMiddleware::class,
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Closure;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Symfony\Component\HttpFoundation;
|
||||||
|
|
||||||
|
class RoleMiddleware
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Handle an incoming request.
|
||||||
|
*
|
||||||
|
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
|
||||||
|
*/
|
||||||
|
public function handle(Request $request, Closure $next, $role)
|
||||||
|
{
|
||||||
|
if (!auth()->check()) {
|
||||||
|
return redirect('/login');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (auth()->user()->role != $role) {
|
||||||
|
abort(403);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $next($request);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -9,12 +9,19 @@ class Anak extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
protected $table = 'anak';
|
protected $table = 'balita';
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'nik',
|
'nik',
|
||||||
'nama',
|
'nama',
|
||||||
'jenis_kelamin',
|
'jenis_kelamin',
|
||||||
'tanggal_lahir',
|
'tgl_lahir',
|
||||||
|
'nama_ortu',
|
||||||
|
'alamat'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
public function getJenisKelaminTextAttribute()
|
||||||
|
{
|
||||||
|
return $this->jenis_kelamin == 1 ? 'Laki-laki' : 'Perempuan';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Edukasi extends Model
|
||||||
|
{
|
||||||
|
use HasFactory;
|
||||||
|
|
||||||
|
protected $table = 'template_edukasi';
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'judul',
|
||||||
|
'konten',
|
||||||
|
'kategori',
|
||||||
|
// 'gambar'
|
||||||
|
];
|
||||||
|
|
||||||
|
// public function getJenisKelaminTextAttribute()
|
||||||
|
// {
|
||||||
|
// return $this->jenis_kelamin == 1 ? 'Laki-laki' : 'Perempuan';
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Edukasi2 extends Model
|
||||||
|
{
|
||||||
|
use HasFactory;
|
||||||
|
|
||||||
|
protected $table = 'edukasi';
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'balita_id',
|
||||||
|
'ibu_hamil_id',
|
||||||
|
'pengukuran_ibu_hamil_id',
|
||||||
|
'pengukuran_balita_id',
|
||||||
|
'judul',
|
||||||
|
'konten',
|
||||||
|
'kategori',
|
||||||
|
// 'gambar'
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class IbuHamil extends Model
|
||||||
|
{
|
||||||
|
use HasFactory;
|
||||||
|
|
||||||
|
protected $table = 'ibu_hamil';
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'nik',
|
||||||
|
'nama',
|
||||||
|
'tgl_lahir',
|
||||||
|
'alamat',
|
||||||
|
'no_hp',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class PengukuranBalita extends Model
|
||||||
|
{
|
||||||
|
use HasFactory;
|
||||||
|
|
||||||
|
protected $table = 'pengukuran_balita';
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'balita_id',
|
||||||
|
'user_id',
|
||||||
|
'tanggal',
|
||||||
|
'berat_badan',
|
||||||
|
'tinggi_badan',
|
||||||
|
'lingkar_kepala',
|
||||||
|
'usia_saat_ukur',
|
||||||
|
'hasil',
|
||||||
|
'zs_tbu'
|
||||||
|
];
|
||||||
|
|
||||||
|
public function ibuHamil()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(IbuHamil::class, 'ibu_hamil_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function petugas()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(User::class, 'user_id');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class PengukuranIbuHamil extends Model
|
||||||
|
{
|
||||||
|
use HasFactory;
|
||||||
|
|
||||||
|
protected $table = 'pengukuran_ibu_hamil';
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'ibu_hamil_id',
|
||||||
|
'user_id',
|
||||||
|
'tanggal',
|
||||||
|
'berat_badan',
|
||||||
|
'tinggi_badan',
|
||||||
|
'lila',
|
||||||
|
'usia_kehamilan',
|
||||||
|
'imt',
|
||||||
|
'status_gizi'
|
||||||
|
];
|
||||||
|
|
||||||
|
public function ibuHamil()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(IbuHamil::class, 'ibu_hamil_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function petugas()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(User::class, 'user_id');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -18,9 +18,11 @@ class User extends Authenticatable
|
||||||
* @var array<int, string>
|
* @var array<int, string>
|
||||||
*/
|
*/
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'name',
|
'nama',
|
||||||
|
'no_hp',
|
||||||
'email',
|
'email',
|
||||||
'password',
|
'password',
|
||||||
|
'role'
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^8.1",
|
"php": "^8.1",
|
||||||
|
"barryvdh/laravel-dompdf": "^3.1",
|
||||||
"guzzlehttp/guzzle": "^7.2",
|
"guzzlehttp/guzzle": "^7.2",
|
||||||
"laravel/framework": "^10.10",
|
"laravel/framework": "^10.10",
|
||||||
"laravel/sanctum": "^3.3",
|
"laravel/sanctum": "^3.3",
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,85 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "9c491b8531eec05ba41a11d9276a5749",
|
"content-hash": "50a9cf43c3c522104b200bfdbe2e0e54",
|
||||||
"packages": [
|
"packages": [
|
||||||
|
{
|
||||||
|
"name": "barryvdh/laravel-dompdf",
|
||||||
|
"version": "v3.1.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/barryvdh/laravel-dompdf.git",
|
||||||
|
"reference": "8e71b99fc53bb8eb77f316c3c452dd74ab7cb25d"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/barryvdh/laravel-dompdf/zipball/8e71b99fc53bb8eb77f316c3c452dd74ab7cb25d",
|
||||||
|
"reference": "8e71b99fc53bb8eb77f316c3c452dd74ab7cb25d",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"dompdf/dompdf": "^3.0",
|
||||||
|
"illuminate/support": "^9|^10|^11|^12",
|
||||||
|
"php": "^8.1"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"larastan/larastan": "^2.7|^3.0",
|
||||||
|
"orchestra/testbench": "^7|^8|^9|^10",
|
||||||
|
"phpro/grumphp": "^2.5",
|
||||||
|
"squizlabs/php_codesniffer": "^3.5"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"laravel": {
|
||||||
|
"aliases": {
|
||||||
|
"PDF": "Barryvdh\\DomPDF\\Facade\\Pdf",
|
||||||
|
"Pdf": "Barryvdh\\DomPDF\\Facade\\Pdf"
|
||||||
|
},
|
||||||
|
"providers": [
|
||||||
|
"Barryvdh\\DomPDF\\ServiceProvider"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "3.0-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Barryvdh\\DomPDF\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Barry vd. Heuvel",
|
||||||
|
"email": "barryvdh@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "A DOMPDF Wrapper for Laravel",
|
||||||
|
"keywords": [
|
||||||
|
"dompdf",
|
||||||
|
"laravel",
|
||||||
|
"pdf"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/barryvdh/laravel-dompdf/issues",
|
||||||
|
"source": "https://github.com/barryvdh/laravel-dompdf/tree/v3.1.1"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://fruitcake.nl",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/barryvdh",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2025-02-13T15:07:54+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "brick/math",
|
"name": "brick/math",
|
||||||
"version": "0.12.3",
|
"version": "0.12.3",
|
||||||
|
|
@ -377,6 +454,161 @@
|
||||||
],
|
],
|
||||||
"time": "2024-02-05T11:56:58+00:00"
|
"time": "2024-02-05T11:56:58+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "dompdf/dompdf",
|
||||||
|
"version": "v3.1.5",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/dompdf/dompdf.git",
|
||||||
|
"reference": "f11ead23a8a76d0ff9bbc6c7c8fd7e05ca328496"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/dompdf/dompdf/zipball/f11ead23a8a76d0ff9bbc6c7c8fd7e05ca328496",
|
||||||
|
"reference": "f11ead23a8a76d0ff9bbc6c7c8fd7e05ca328496",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"dompdf/php-font-lib": "^1.0.0",
|
||||||
|
"dompdf/php-svg-lib": "^1.0.0",
|
||||||
|
"ext-dom": "*",
|
||||||
|
"ext-mbstring": "*",
|
||||||
|
"masterminds/html5": "^2.0",
|
||||||
|
"php": "^7.1 || ^8.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"ext-gd": "*",
|
||||||
|
"ext-json": "*",
|
||||||
|
"ext-zip": "*",
|
||||||
|
"mockery/mockery": "^1.3",
|
||||||
|
"phpunit/phpunit": "^7.5 || ^8 || ^9 || ^10 || ^11",
|
||||||
|
"squizlabs/php_codesniffer": "^3.5",
|
||||||
|
"symfony/process": "^4.4 || ^5.4 || ^6.2 || ^7.0"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"ext-gd": "Needed to process images",
|
||||||
|
"ext-gmagick": "Improves image processing performance",
|
||||||
|
"ext-imagick": "Improves image processing performance",
|
||||||
|
"ext-zlib": "Needed for pdf stream compression"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Dompdf\\": "src/"
|
||||||
|
},
|
||||||
|
"classmap": [
|
||||||
|
"lib/"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"LGPL-2.1"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "The Dompdf Community",
|
||||||
|
"homepage": "https://github.com/dompdf/dompdf/blob/master/AUTHORS.md"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "DOMPDF is a CSS 2.1 compliant HTML to PDF converter",
|
||||||
|
"homepage": "https://github.com/dompdf/dompdf",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/dompdf/dompdf/issues",
|
||||||
|
"source": "https://github.com/dompdf/dompdf/tree/v3.1.5"
|
||||||
|
},
|
||||||
|
"time": "2026-03-03T13:54:37+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dompdf/php-font-lib",
|
||||||
|
"version": "1.0.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/dompdf/php-font-lib.git",
|
||||||
|
"reference": "a6e9a688a2a80016ac080b97be73d3e10c444c9a"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/dompdf/php-font-lib/zipball/a6e9a688a2a80016ac080b97be73d3e10c444c9a",
|
||||||
|
"reference": "a6e9a688a2a80016ac080b97be73d3e10c444c9a",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-mbstring": "*",
|
||||||
|
"php": "^7.1 || ^8.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "^7.5 || ^8 || ^9 || ^10 || ^11 || ^12"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"FontLib\\": "src/FontLib"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"LGPL-2.1-or-later"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "The FontLib Community",
|
||||||
|
"homepage": "https://github.com/dompdf/php-font-lib/blob/master/AUTHORS.md"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "A library to read, parse, export and make subsets of different types of font files.",
|
||||||
|
"homepage": "https://github.com/dompdf/php-font-lib",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/dompdf/php-font-lib/issues",
|
||||||
|
"source": "https://github.com/dompdf/php-font-lib/tree/1.0.2"
|
||||||
|
},
|
||||||
|
"time": "2026-01-20T14:10:26+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dompdf/php-svg-lib",
|
||||||
|
"version": "1.0.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/dompdf/php-svg-lib.git",
|
||||||
|
"reference": "8259ffb930817e72b1ff1caef5d226501f3dfeb1"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/dompdf/php-svg-lib/zipball/8259ffb930817e72b1ff1caef5d226501f3dfeb1",
|
||||||
|
"reference": "8259ffb930817e72b1ff1caef5d226501f3dfeb1",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-mbstring": "*",
|
||||||
|
"php": "^7.1 || ^8.0",
|
||||||
|
"sabberworm/php-css-parser": "^8.4 || ^9.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "^7.5 || ^8 || ^9 || ^10 || ^11"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Svg\\": "src/Svg"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"LGPL-3.0-or-later"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "The SvgLib Community",
|
||||||
|
"homepage": "https://github.com/dompdf/php-svg-lib/blob/master/AUTHORS.md"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "A library to read, parse and export to PDF SVG files.",
|
||||||
|
"homepage": "https://github.com/dompdf/php-svg-lib",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/dompdf/php-svg-lib/issues",
|
||||||
|
"source": "https://github.com/dompdf/php-svg-lib/tree/1.0.2"
|
||||||
|
},
|
||||||
|
"time": "2026-01-02T16:01:13+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "dragonmantank/cron-expression",
|
"name": "dragonmantank/cron-expression",
|
||||||
"version": "v3.5.0",
|
"version": "v3.5.0",
|
||||||
|
|
@ -1888,6 +2120,73 @@
|
||||||
],
|
],
|
||||||
"time": "2024-09-21T08:32:55+00:00"
|
"time": "2024-09-21T08:32:55+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "masterminds/html5",
|
||||||
|
"version": "2.10.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/Masterminds/html5-php.git",
|
||||||
|
"reference": "fcf91eb64359852f00d921887b219479b4f21251"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/Masterminds/html5-php/zipball/fcf91eb64359852f00d921887b219479b4f21251",
|
||||||
|
"reference": "fcf91eb64359852f00d921887b219479b4f21251",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-dom": "*",
|
||||||
|
"php": ">=5.3.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8 || ^9"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "2.7-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Masterminds\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Matt Butcher",
|
||||||
|
"email": "technosophos@gmail.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Matt Farina",
|
||||||
|
"email": "matt@mattfarina.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Asmir Mustafic",
|
||||||
|
"email": "goetas@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "An HTML5 parser and serializer.",
|
||||||
|
"homepage": "http://masterminds.github.io/html5-php",
|
||||||
|
"keywords": [
|
||||||
|
"HTML5",
|
||||||
|
"dom",
|
||||||
|
"html",
|
||||||
|
"parser",
|
||||||
|
"querypath",
|
||||||
|
"serializer",
|
||||||
|
"xml"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/Masterminds/html5-php/issues",
|
||||||
|
"source": "https://github.com/Masterminds/html5-php/tree/2.10.0"
|
||||||
|
},
|
||||||
|
"time": "2025-07-25T09:04:22+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "monolog/monolog",
|
"name": "monolog/monolog",
|
||||||
"version": "3.10.0",
|
"version": "3.10.0",
|
||||||
|
|
@ -3159,6 +3458,86 @@
|
||||||
},
|
},
|
||||||
"time": "2025-12-14T04:43:48+00:00"
|
"time": "2025-12-14T04:43:48+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "sabberworm/php-css-parser",
|
||||||
|
"version": "v9.3.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/MyIntervals/PHP-CSS-Parser.git",
|
||||||
|
"reference": "88dbd0f7f91abbfe4402d0a3071e9ff4d81ed949"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/MyIntervals/PHP-CSS-Parser/zipball/88dbd0f7f91abbfe4402d0a3071e9ff4d81ed949",
|
||||||
|
"reference": "88dbd0f7f91abbfe4402d0a3071e9ff4d81ed949",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-iconv": "*",
|
||||||
|
"php": "^7.2.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0",
|
||||||
|
"thecodingmachine/safe": "^1.3 || ^2.5 || ^3.4"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"php-parallel-lint/php-parallel-lint": "1.4.0",
|
||||||
|
"phpstan/extension-installer": "1.4.3",
|
||||||
|
"phpstan/phpstan": "1.12.32 || 2.1.32",
|
||||||
|
"phpstan/phpstan-phpunit": "1.4.2 || 2.0.8",
|
||||||
|
"phpstan/phpstan-strict-rules": "1.6.2 || 2.0.7",
|
||||||
|
"phpunit/phpunit": "8.5.52",
|
||||||
|
"rawr/phpunit-data-provider": "3.3.1",
|
||||||
|
"rector/rector": "1.2.10 || 2.2.8",
|
||||||
|
"rector/type-perfect": "1.0.0 || 2.1.0",
|
||||||
|
"squizlabs/php_codesniffer": "4.0.1",
|
||||||
|
"thecodingmachine/phpstan-safe-rule": "1.2.0 || 1.4.1"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"ext-mbstring": "for parsing UTF-8 CSS"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-main": "9.4.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"src/Rule/Rule.php",
|
||||||
|
"src/RuleSet/RuleContainer.php"
|
||||||
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"Sabberworm\\CSS\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Raphael Schweikert"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Oliver Klee",
|
||||||
|
"email": "github@oliverklee.de"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Jake Hotson",
|
||||||
|
"email": "jake.github@qzdesign.co.uk"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Parser for CSS Files written in PHP",
|
||||||
|
"homepage": "https://www.sabberworm.com/blog/2010/6/10/php-css-parser",
|
||||||
|
"keywords": [
|
||||||
|
"css",
|
||||||
|
"parser",
|
||||||
|
"stylesheet"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/MyIntervals/PHP-CSS-Parser/issues",
|
||||||
|
"source": "https://github.com/MyIntervals/PHP-CSS-Parser/tree/v9.3.0"
|
||||||
|
},
|
||||||
|
"time": "2026-03-03T17:31:43+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/console",
|
"name": "symfony/console",
|
||||||
"version": "v6.4.32",
|
"version": "v6.4.32",
|
||||||
|
|
@ -5416,6 +5795,149 @@
|
||||||
],
|
],
|
||||||
"time": "2026-01-01T13:34:06+00:00"
|
"time": "2026-01-01T13:34:06+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "thecodingmachine/safe",
|
||||||
|
"version": "v3.4.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/thecodingmachine/safe.git",
|
||||||
|
"reference": "705683a25bacf0d4860c7dea4d7947bfd09eea19"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/thecodingmachine/safe/zipball/705683a25bacf0d4860c7dea4d7947bfd09eea19",
|
||||||
|
"reference": "705683a25bacf0d4860c7dea4d7947bfd09eea19",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": "^8.1"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"php-parallel-lint/php-parallel-lint": "^1.4",
|
||||||
|
"phpstan/phpstan": "^2",
|
||||||
|
"phpunit/phpunit": "^10",
|
||||||
|
"squizlabs/php_codesniffer": "^3.2"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"lib/special_cases.php",
|
||||||
|
"generated/apache.php",
|
||||||
|
"generated/apcu.php",
|
||||||
|
"generated/array.php",
|
||||||
|
"generated/bzip2.php",
|
||||||
|
"generated/calendar.php",
|
||||||
|
"generated/classobj.php",
|
||||||
|
"generated/com.php",
|
||||||
|
"generated/cubrid.php",
|
||||||
|
"generated/curl.php",
|
||||||
|
"generated/datetime.php",
|
||||||
|
"generated/dir.php",
|
||||||
|
"generated/eio.php",
|
||||||
|
"generated/errorfunc.php",
|
||||||
|
"generated/exec.php",
|
||||||
|
"generated/fileinfo.php",
|
||||||
|
"generated/filesystem.php",
|
||||||
|
"generated/filter.php",
|
||||||
|
"generated/fpm.php",
|
||||||
|
"generated/ftp.php",
|
||||||
|
"generated/funchand.php",
|
||||||
|
"generated/gettext.php",
|
||||||
|
"generated/gmp.php",
|
||||||
|
"generated/gnupg.php",
|
||||||
|
"generated/hash.php",
|
||||||
|
"generated/ibase.php",
|
||||||
|
"generated/ibmDb2.php",
|
||||||
|
"generated/iconv.php",
|
||||||
|
"generated/image.php",
|
||||||
|
"generated/imap.php",
|
||||||
|
"generated/info.php",
|
||||||
|
"generated/inotify.php",
|
||||||
|
"generated/json.php",
|
||||||
|
"generated/ldap.php",
|
||||||
|
"generated/libxml.php",
|
||||||
|
"generated/lzf.php",
|
||||||
|
"generated/mailparse.php",
|
||||||
|
"generated/mbstring.php",
|
||||||
|
"generated/misc.php",
|
||||||
|
"generated/mysql.php",
|
||||||
|
"generated/mysqli.php",
|
||||||
|
"generated/network.php",
|
||||||
|
"generated/oci8.php",
|
||||||
|
"generated/opcache.php",
|
||||||
|
"generated/openssl.php",
|
||||||
|
"generated/outcontrol.php",
|
||||||
|
"generated/pcntl.php",
|
||||||
|
"generated/pcre.php",
|
||||||
|
"generated/pgsql.php",
|
||||||
|
"generated/posix.php",
|
||||||
|
"generated/ps.php",
|
||||||
|
"generated/pspell.php",
|
||||||
|
"generated/readline.php",
|
||||||
|
"generated/rnp.php",
|
||||||
|
"generated/rpminfo.php",
|
||||||
|
"generated/rrd.php",
|
||||||
|
"generated/sem.php",
|
||||||
|
"generated/session.php",
|
||||||
|
"generated/shmop.php",
|
||||||
|
"generated/sockets.php",
|
||||||
|
"generated/sodium.php",
|
||||||
|
"generated/solr.php",
|
||||||
|
"generated/spl.php",
|
||||||
|
"generated/sqlsrv.php",
|
||||||
|
"generated/ssdeep.php",
|
||||||
|
"generated/ssh2.php",
|
||||||
|
"generated/stream.php",
|
||||||
|
"generated/strings.php",
|
||||||
|
"generated/swoole.php",
|
||||||
|
"generated/uodbc.php",
|
||||||
|
"generated/uopz.php",
|
||||||
|
"generated/url.php",
|
||||||
|
"generated/var.php",
|
||||||
|
"generated/xdiff.php",
|
||||||
|
"generated/xml.php",
|
||||||
|
"generated/xmlrpc.php",
|
||||||
|
"generated/yaml.php",
|
||||||
|
"generated/yaz.php",
|
||||||
|
"generated/zip.php",
|
||||||
|
"generated/zlib.php"
|
||||||
|
],
|
||||||
|
"classmap": [
|
||||||
|
"lib/DateTime.php",
|
||||||
|
"lib/DateTimeImmutable.php",
|
||||||
|
"lib/Exceptions/",
|
||||||
|
"generated/Exceptions/"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"description": "PHP core functions that throw exceptions instead of returning FALSE on error",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/thecodingmachine/safe/issues",
|
||||||
|
"source": "https://github.com/thecodingmachine/safe/tree/v3.4.0"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/OskarStark",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/shish",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/silasjoisten",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/staabm",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2026-02-04T18:08:13+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "tijsverkoyen/css-to-inline-styles",
|
"name": "tijsverkoyen/css-to-inline-styles",
|
||||||
"version": "v2.4.0",
|
"version": "v2.4.0",
|
||||||
|
|
|
||||||
|
|
@ -13,10 +13,10 @@ public function up(): void
|
||||||
{
|
{
|
||||||
Schema::create('users', function (Blueprint $table) {
|
Schema::create('users', function (Blueprint $table) {
|
||||||
$table->id();
|
$table->id();
|
||||||
$table->string('name');
|
$table->string('nama', 100);
|
||||||
$table->string('no_hp')->nullable();
|
$table->string('no_hp', 15)->nullable();
|
||||||
$table->string('email')->unique();
|
$table->string('email', 100)->unique();
|
||||||
$table->string('password');
|
$table->string('password', 255);
|
||||||
$table->enum('role', ['admin', 'petugas']);
|
$table->enum('role', ['admin', 'petugas']);
|
||||||
$table->rememberToken();
|
$table->rememberToken();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
|
|
|
||||||
|
|
@ -11,12 +11,15 @@
|
||||||
*/
|
*/
|
||||||
public function up(): void
|
public function up(): void
|
||||||
{
|
{
|
||||||
Schema::create('anak', function (Blueprint $table) {
|
Schema::create('balita', function (Blueprint $table) {
|
||||||
$table->id();
|
$table->id();
|
||||||
$table->string('nik')->unique();
|
$table->string('nik')->unique();
|
||||||
$table->string('nama', 100);
|
$table->string('nama', 100);
|
||||||
$table->tinyInteger('jenis_kelamin'); // 1 = laki-laki, 0 = perempuan
|
$table->tinyInteger('jenis_kelamin'); // 1 = laki-laki, 0 = perempuan
|
||||||
$table->date('tanggal_lahir');
|
$table->date('tgl_lahir');
|
||||||
|
$table->string('nama_ortu', 50);
|
||||||
|
$table->text('alamat');
|
||||||
|
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -15,8 +15,9 @@ public function up(): void
|
||||||
$table->id();
|
$table->id();
|
||||||
$table->string('nik')->unique();
|
$table->string('nik')->unique();
|
||||||
$table->string('nama', 100);
|
$table->string('nama', 100);
|
||||||
$table->integer('usia');
|
$table->date('tgl_lahir');
|
||||||
$table->integer('usia_kehamilan'); // minggu
|
$table->text('alamat');
|
||||||
|
$table->string('no_hp', 15);
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('pengukuran_balita', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->foreignId('balita_id')
|
||||||
|
->constrained('balita')
|
||||||
|
->onDelete('cascade');
|
||||||
|
|
||||||
|
$table->foreignId('user_id')
|
||||||
|
->constrained('users')
|
||||||
|
->onDelete('cascade');
|
||||||
|
|
||||||
|
$table->decimal('berat_badan', 5, 2); // kg
|
||||||
|
$table->decimal('tinggi_badan', 5, 2); // cm
|
||||||
|
$table->decimal('lingkar_kepala', 5, 2); // cm
|
||||||
|
|
||||||
|
$table->integer('usia_saat_ukur'); // bulan
|
||||||
|
$table->date('tanggal');
|
||||||
|
|
||||||
|
$table->string('hasil');
|
||||||
|
$table->decimal('zs_tbu', 5, 2)->nullable();
|
||||||
|
$table->decimal('bmi', 5, 2)->nullable();
|
||||||
|
$table->decimal('zs_bmi_u', 5, 2)->nullable();
|
||||||
|
|
||||||
|
$table->string('status_gizi_bmi', 100)->nullable();
|
||||||
|
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('pengukuran_balita');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('pengukuran_ibu_hamil', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
|
||||||
|
$table->foreignId('ibu_hamil_id')
|
||||||
|
->constrained('ibu_hamil')
|
||||||
|
->onDelete('cascade');
|
||||||
|
|
||||||
|
$table->foreignId('user_id')
|
||||||
|
->constrained('users')
|
||||||
|
->onDelete('cascade');
|
||||||
|
|
||||||
|
$table->decimal('berat_badan', 5, 2); // kg
|
||||||
|
$table->decimal('tinggi_badan', 5, 2); // cm
|
||||||
|
$table->decimal('lila', 5, 2)->nullable(); // cm
|
||||||
|
|
||||||
|
$table->integer('usia_kehamilan'); // minggu
|
||||||
|
$table->date('tanggal');
|
||||||
|
|
||||||
|
$table->decimal('imt', 5, 2);
|
||||||
|
|
||||||
|
$table->enum('status_gizi', [
|
||||||
|
'ibu hamil gizi kurang',
|
||||||
|
'ibu hamil gizi normal',
|
||||||
|
'ibu hamil gizi lebih',
|
||||||
|
'ibu hamil obesitas'
|
||||||
|
])->nullable();
|
||||||
|
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('pengukuran_ibu_hamil');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('template_edukasi', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('judul', 100);
|
||||||
|
$table->text('konten');
|
||||||
|
$table->enum('kategori', [
|
||||||
|
'Resiko tinggi stunting',
|
||||||
|
'Stunting',
|
||||||
|
'Normal',
|
||||||
|
'Resiko gizi lebih',
|
||||||
|
'Ibu hamil gizi kurang',
|
||||||
|
'Ibu hamil gizi normal',
|
||||||
|
'Ibu hamil gizi lebih',
|
||||||
|
'Ibu hamil obesitas',
|
||||||
|
'Ibu hamil risiko kek'
|
||||||
|
])->nullable();
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('template_edukasi');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('edukasi', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->foreignId('balita_id')->nullable()
|
||||||
|
->constrained('balita')
|
||||||
|
->onDelete('cascade');
|
||||||
|
|
||||||
|
$table->foreignId('ibu_hamil_id')->nullable()
|
||||||
|
->constrained('ibu_hamil')
|
||||||
|
->onDelete('cascade');
|
||||||
|
|
||||||
|
$table->foreignId('pengukuran_ibu_hamil_id')->nullable()
|
||||||
|
->constrained('pengukuran_ibu_hamil')
|
||||||
|
->onDelete('cascade');
|
||||||
|
|
||||||
|
$table->foreignId('pengukuran_balita_id')->nullable()
|
||||||
|
->constrained('pengukuran_balita')
|
||||||
|
->onDelete('cascade');
|
||||||
|
|
||||||
|
$table->string('judul', 100);
|
||||||
|
$table->text('konten');
|
||||||
|
$table->enum('kategori', [
|
||||||
|
'Resiko tinggi stunting',
|
||||||
|
'Stunting',
|
||||||
|
'Normal',
|
||||||
|
'Resiko gizi lebih',
|
||||||
|
'Ibu hamil gizi kurang',
|
||||||
|
'Ibu hamil gizi normal',
|
||||||
|
'Ibu hamil gizi lebih',
|
||||||
|
'Ibu hamil obesitas',
|
||||||
|
'Ibu hamil risiko kek'
|
||||||
|
])->nullable();
|
||||||
|
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('edukasi');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
@ -11,10 +11,15 @@
|
||||||
*/
|
*/
|
||||||
public function up(): void
|
public function up(): void
|
||||||
{
|
{
|
||||||
Schema::create('kategori_edukasi', function (Blueprint $table) {
|
Schema::create('laporan', function (Blueprint $table) {
|
||||||
$table->id();
|
$table->id();
|
||||||
$table->string('nama_kategori');
|
$table->foreignId('pengukuran_ibu_hamil_id')
|
||||||
$table->enum('target', ['balita', 'ibu_hamil']);
|
->constrained('pengukuran_ibu_hamil')
|
||||||
|
->onDelete('cascade');
|
||||||
|
|
||||||
|
$table->foreignId('pengukuran_balita_id')
|
||||||
|
->constrained('pengukuran_balita')
|
||||||
|
->onDelete('cascade');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -24,6 +29,6 @@ public function up(): void
|
||||||
*/
|
*/
|
||||||
public function down(): void
|
public function down(): void
|
||||||
{
|
{
|
||||||
Schema::dropIfExists('kategori_edukasi');
|
Schema::dropIfExists('laporan');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('pengukuran_balita', function (Blueprint $table) {
|
||||||
|
$table->dropColumn([
|
||||||
|
'bmi',
|
||||||
|
'zs_bmi_u',
|
||||||
|
'status_gizi_bmi'
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
{
|
||||||
|
Schema::table('pengukuran_balita', function (Blueprint $table) {
|
||||||
|
$table->decimal('bmi', 5, 2)->nullable();
|
||||||
|
$table->decimal('zs_bmi_u', 5, 2)->nullable();
|
||||||
|
$table->string('status_gizi_bmi', 100)->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
@ -321,25 +321,29 @@
|
||||||
<div class="card shadow-lg animated" style="animation-delay: 1s;">
|
<div class="card shadow-lg animated" style="animation-delay: 1s;">
|
||||||
<h3 class="text-center fw-bold mb-3 " style="animation-delay: 0.5s; color: #ff5757">Selamat Datang</h3>
|
<h3 class="text-center fw-bold mb-3 " style="animation-delay: 0.5s; color: #ff5757">Selamat Datang</h3>
|
||||||
<p class="text-center text-muted mb-4 animated" style="animation-delay: 0.7s;">Silakan masuk untuk melanjutkan</p>
|
<p class="text-center text-muted mb-4 animated" style="animation-delay: 0.7s;">Silakan masuk untuk melanjutkan</p>
|
||||||
|
|
||||||
|
@if(session('error'))
|
||||||
|
<div class="alert alert-danger">
|
||||||
|
{{ session('error') }}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
<form action="/proseslogin" method="POST">
|
<form action="/proseslogin" method="POST">
|
||||||
<!-- @csrf (aktifkan di Laravel) -->
|
@csrf
|
||||||
<div class="mb-3 animated" style="animation-delay: 0.9s;">
|
<div class="mb-3 animated" style="animation-delay: 0.9s;">
|
||||||
<label for="email" class="form-label">Email</label>
|
<label for="email" class="form-label">Email</label>
|
||||||
<input type="email" class="form-control rounded-3" id="email" name="email" placeholder="Masukkan email Anda" required>
|
<input type="email" class="form-control rounded-3" id="email" name="email" placeholder="Masukkan email Anda" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-3 animated" style="animation-delay: 1.1s;">
|
<div class="mb-3 animated" style="animation-delay: 1.1s;">
|
||||||
<label for="password" class="form-label">Password</label>
|
<label for="password" class="form-label">Password</label>
|
||||||
<input type="password" class="form-control rounded-3" id="password" name="password" placeholder="Masukkan password Anda" required>
|
<input type="password" class="form-control rounded-3" id="password" name="password" placeholder="Masukkan password Anda" required>
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" class="btn btn-primary w-100 rounded-pill mt-3 animated" style="animation-delay: 1.3s;">Masuk</button>
|
<button type="submit" class="btn btn-primary w-100 rounded-pill mt-3 animated" style="animation-delay: 1.3s;">Masuk</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div class="text-center mt-4 animated" style="animation-delay: 1.5s;">
|
<div class="text-center mt-4 animated" style="animation-delay: 1.5s;">
|
||||||
<a href="#" class="text-muted small">Lupa password?</a>
|
<a href="#" class="text-muted small">Lupa password?</a>
|
||||||
</div>
|
</div>
|
||||||
<hr class="my-4">
|
|
||||||
<div class="text-center animated" style="animation-delay: 1.7s;">
|
|
||||||
<p class="small text-muted">Belum punya akun? <a href="/register" class="text-primary">Daftar</a></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -17,35 +17,46 @@
|
||||||
<h5 class="card-title">Tambah Data Balita</h5>
|
<h5 class="card-title">Tambah Data Balita</h5>
|
||||||
|
|
||||||
<!-- General Form Elements -->
|
<!-- General Form Elements -->
|
||||||
<form>
|
<form action="{{ route('balita.store') }}" method="POST">
|
||||||
<div class="row mb-3">
|
@csrf
|
||||||
<label for="nama_wali" class="col-sm-2 col-form-label">Nama Wali</label>
|
|
||||||
<div class="col-sm-10">
|
|
||||||
<input type="text" class="form-control">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<label for="nik" class="col-sm-2 col-form-label">NIK</label>
|
<label for="nik" class="col-sm-2 col-form-label">NIK</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input type="text" class="form-control">
|
<input type="text" class="form-control" name="nik" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<label for="nama" class="col-sm-2 col-form-label">Nama Balita</label>
|
<label for="nama" class="col-sm-2 col-form-label">Nama Balita</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input type="text" class="form-control">
|
<input type="text" class="form-control" name="nama" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<label for="jenis_kelamin" class="col-sm-2 col-form-label">Jenis Kelamin</label>
|
<label for="jenis_kelamin" class="col-sm-2 col-form-label">Jenis Kelamin</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input type="text" class="form-control">
|
<select name="jenis_kelamin" class="form-control" required>
|
||||||
|
<option value="">-- Pilih Jenis Kelamin --</option>
|
||||||
|
<option value="1">Laki-laki</option>
|
||||||
|
<option value="0">Perempuan</option>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<label for="tgl_lahir" class="col-sm-2 col-form-label">Tanggal Lahir</label>
|
<label for="tgl_lahir" class="col-sm-2 col-form-label">Tanggal Lahir</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input type="date" class="form-control">
|
<input type="date" class="form-control" name="tgl_lahir" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="nama_ortu" class="col-sm-2 col-form-label">Nama Ortu</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" name="nama_ortu" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="alamat" class="col-sm-2 col-form-label">Alamat</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" name="alamat" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,39 +27,88 @@
|
||||||
<table class="table table-hover align-middle datatable">
|
<table class="table table-hover align-middle datatable">
|
||||||
<thead class="table-light">
|
<thead class="table-light">
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 5%">No</th>
|
<th style="width: 5%" >No</th>
|
||||||
<th>Nama Balita</th>
|
<th>Nama Balita</th>
|
||||||
<th>Alamat</th>
|
<th class="text-center">Alamat</th>
|
||||||
<th>Tanggal Lahir</th>
|
<th>Tanggal Lahir</th>
|
||||||
<th>Jenis Kelamin</th>
|
<th>Jenis Kelamin</th>
|
||||||
<th>Nama Orang Tua</th>
|
<th>Nama Orang Tua</th>
|
||||||
<th style="width: 15%" class="text-center">Aksi</th>
|
<th style="width: 15%" class="text-center">Aksi</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
@forelse ($balita as $index => $balitas)
|
||||||
<td></td>
|
<tr>
|
||||||
<td></td>
|
<td>{{ $index + 1 }}</td>
|
||||||
<td></td>
|
<td>{{ $balitas->nama }}</td>
|
||||||
<td></td>
|
<td>{{ $balitas->alamat }}</td>
|
||||||
<td>
|
<td>{{ $balitas->tgl_lahir }}</td>
|
||||||
<span class="badge bg-pink"></span>
|
<td>
|
||||||
</td>
|
<span class="">
|
||||||
<td></td>
|
{{ $balitas->jenis_kelamin == 1 ? 'Laki-laki' : 'Perempuan' }}
|
||||||
<td class="text-center">
|
</span>
|
||||||
<button class="btn btn-sm btn-warning me-1" title="Edit">
|
</td>
|
||||||
<i class="bi bi-pencil-square"></i>
|
<td>{{ $balitas->nama_ortu }}</td>
|
||||||
</button>
|
<td class="text-center">
|
||||||
<button class="btn btn-sm btn-danger" title="Hapus">
|
|
||||||
<i class="bi bi-trash"></i>
|
<!-- Edit -->
|
||||||
</button>
|
<a href="{{ route('balita.edit', $balitas->id) }}"
|
||||||
</td>
|
class="btn btn-sm btn-warning me-1" title="Edit">
|
||||||
</tr>
|
<i class="bi bi-pencil-square"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<!-- Delete -->
|
||||||
|
<form action="{{ route('balita.destroy', $balitas->id) }}"
|
||||||
|
method="POST"
|
||||||
|
style="display:inline;">
|
||||||
|
@csrf
|
||||||
|
@method('DELETE')
|
||||||
|
<button class="btn btn-sm btn-danger"
|
||||||
|
onclick="return confirm('Yakin ingin menghapus data?')"
|
||||||
|
title="Hapus">
|
||||||
|
<i class="bi bi-trash"></i>
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
@empty
|
||||||
|
<tr>
|
||||||
|
<td colspan="7" class="text-center text-muted">
|
||||||
|
Belum ada data balita
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforelse
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{-- <div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Pagination with icon</h5>
|
||||||
|
|
||||||
|
<!-- Pagination with icons -->
|
||||||
|
<nav aria-label="Page navigation example">
|
||||||
|
<ul class="pagination">
|
||||||
|
<li class="page-item">
|
||||||
|
<a class="page-link" href="#" aria-label="Previous">
|
||||||
|
<span aria-hidden="true">«</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="page-item"><a class="page-link" href="#">1</a></li>
|
||||||
|
<li class="page-item"><a class="page-link" href="#">2</a></li>
|
||||||
|
<li class="page-item"><a class="page-link" href="#">3</a></li>
|
||||||
|
<li class="page-item">
|
||||||
|
<a class="page-link" href="#" aria-label="Next">
|
||||||
|
<span aria-hidden="true">»</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav><!-- End Pagination with icons -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div> --}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,81 @@
|
||||||
|
@extends('layouts.dashboard')
|
||||||
|
|
||||||
|
@section('title', 'Edit Data Balita')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
<div class="pagetitle mb-4">
|
||||||
|
<h1 style="color: #9c3a5b;">Edit Data Balita</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-10">
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Edit Data Balita</h5>
|
||||||
|
|
||||||
|
<!-- General Form Elements -->
|
||||||
|
<form action="{{ route('balita.update', $balita->id) }}" method="POST">
|
||||||
|
@csrf
|
||||||
|
@method('PUT')
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="nik" class="col-sm-2 col-form-label">NIK</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" name="nik" value="{{ $balita->nik }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="nama" class="col-sm-2 col-form-label">Nama Balita</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" name="nama" value="{{ $balita->nama }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="jenis_kelamin" class="col-sm-2 col-form-label">Jenis Kelamin</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<select name="jenis_kelamin" class="form-control">
|
||||||
|
<option value="1" {{ $balita->jenis_kelamin == 1 ? 'selected' : '' }}>
|
||||||
|
Laki-laki
|
||||||
|
</option>
|
||||||
|
|
||||||
|
<option value="0" {{ $balita->jenis_kelamin == 0 ? 'selected' : '' }}>
|
||||||
|
Perempuan
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="tgl_lahir" class="col-sm-2 col-form-label">Tanggal Lahir</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="date" class="form-control" name="tgl_lahir" value="{{ $balita->tgl_lahir }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="nama_ortu" class="col-sm-2 col-form-label">Nama Ortu</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" name="nama_ortu" value="{{ $balita->nama_ortu }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="alamat" class="col-sm-2 col-form-label">Alamat</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" name="alamat" value="{{ $balita->alamat }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<button type="submit" class="btn btn-primary">Submit Form</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form><!-- End General Form Elements -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
@endsection
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
<i class="bi bi-emoji-laughing"></i>
|
<i class="bi bi-emoji-laughing"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="ps-3">
|
<div class="ps-3">
|
||||||
<h6 class="text-danger mb-0">145</h6>
|
<h6 class="text-danger mb-0">{{ $total_balita }}</h6>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -36,15 +36,15 @@
|
||||||
<div class="card info-card h-100">
|
<div class="card info-card h-100">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5 class="card-title text-danger">
|
<h5 class="card-title text-danger">
|
||||||
Balita Risiko Stunting <span>| Total</span>
|
Pengguna <span>| Total</span>
|
||||||
</h5>
|
</h5>
|
||||||
|
|
||||||
<div class="d-flex align-items-center">
|
<div class="d-flex align-items-center">
|
||||||
<div class="card-icon rounded-circle d-flex align-items-center justify-content-center text-danger">
|
<div class="card-icon rounded-circle d-flex align-items-center justify-content-center text-danger">
|
||||||
<i class="bi bi-emoji-frown"></i>
|
<i class="bi bi-person"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="ps-3">
|
<div class="ps-3">
|
||||||
<h6 class="text-danger mb-0">335</h6>
|
<h6 class="text-danger mb-0">{{ $total_petugas }}</h6>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -64,13 +64,95 @@
|
||||||
<i class="bi bi-person-check"></i>
|
<i class="bi bi-person-check"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="ps-3">
|
<div class="ps-3">
|
||||||
<h6 class="text-danger mb-0">45</h6>
|
<h6 class="text-danger mb-0">{{ $total_ibu_hamil }}</h6>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Reports -->
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
|
|
||||||
|
<div class="filter">
|
||||||
|
<a class="icon" href="#" data-bs-toggle="dropdown"><i class="bi bi-three-dots"></i></a>
|
||||||
|
<ul class="dropdown-menu dropdown-menu-end dropdown-menu-arrow">
|
||||||
|
<li class="dropdown-header text-start">
|
||||||
|
<h6>Filter</h6>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li><a class="dropdown-item" href="#">Today</a></li>
|
||||||
|
<li><a class="dropdown-item" href="#">This Month</a></li>
|
||||||
|
<li><a class="dropdown-item" href="#">This Year</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Reports <span>/Today</span></h5>
|
||||||
|
|
||||||
|
<!-- Line Chart -->
|
||||||
|
<div id="reportsChart"></div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
|
new ApexCharts(document.querySelector("#reportsChart"), {
|
||||||
|
series: [{
|
||||||
|
name: 'Sales',
|
||||||
|
data: [31, 40, 28, 51, 42, 82, 56],
|
||||||
|
}, {
|
||||||
|
name: 'Revenue',
|
||||||
|
data: [11, 32, 45, 32, 34, 52, 41]
|
||||||
|
}, {
|
||||||
|
name: 'Customers',
|
||||||
|
data: [15, 11, 32, 18, 9, 24, 11]
|
||||||
|
}],
|
||||||
|
chart: {
|
||||||
|
height: 350,
|
||||||
|
type: 'area',
|
||||||
|
toolbar: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
},
|
||||||
|
markers: {
|
||||||
|
size: 4
|
||||||
|
},
|
||||||
|
colors: ['#4154f1', '#2eca6a', '#ff771d'],
|
||||||
|
fill: {
|
||||||
|
type: "gradient",
|
||||||
|
gradient: {
|
||||||
|
shadeIntensity: 1,
|
||||||
|
opacityFrom: 0.3,
|
||||||
|
opacityTo: 0.4,
|
||||||
|
stops: [0, 90, 100]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dataLabels: {
|
||||||
|
enabled: false
|
||||||
|
},
|
||||||
|
stroke: {
|
||||||
|
curve: 'smooth',
|
||||||
|
width: 2
|
||||||
|
},
|
||||||
|
xaxis: {
|
||||||
|
type: 'datetime',
|
||||||
|
categories: ["2018-09-19T00:00:00.000Z", "2018-09-19T01:30:00.000Z", "2018-09-19T02:30:00.000Z", "2018-09-19T03:30:00.000Z", "2018-09-19T04:30:00.000Z", "2018-09-19T05:30:00.000Z", "2018-09-19T06:30:00.000Z"]
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
x: {
|
||||||
|
format: 'dd/MM/yy HH:mm'
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}).render();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<!-- End Line Chart -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div><!-- End Reports -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,74 @@
|
||||||
|
@extends('layouts.dashboard')
|
||||||
|
|
||||||
|
@section('title', 'Form Data Edukasi')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
<div class="pagetitle mb-4">
|
||||||
|
<h1 style="color: #9c3a5b;">Form Data Edukasi</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-10">
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Tambah Data Edukasi</h5>
|
||||||
|
|
||||||
|
<!-- General Form Elements -->
|
||||||
|
<form action="{{ route('edukasi.store') }}" method="POST" enctype="multipart/form-data">
|
||||||
|
@csrf
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="kategori" class="col-sm-2 col-form-label">Kategori</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<select name="kategori" class="form-control" required>
|
||||||
|
<option value="">-- Pilih Kategori --</option>
|
||||||
|
<option value="Resiko Tinggi Stunting">Resiko Stunting Rendah</option>
|
||||||
|
<option value="Stunting">Stunting</option>
|
||||||
|
<option value="Normal">Normal</option>
|
||||||
|
<option value="Resiko Gizi Lebih">Resiko Gizi Lebih</option>
|
||||||
|
|
||||||
|
<option value="ibu hamil gizi kurang">Ibu Hamil Gizi Kurang</option>
|
||||||
|
<option value="ibu hamil gizi normal">Ibu Hamil Gizi Normal</option>
|
||||||
|
<option value="ibu hamil gizi lebih">Ibu Hamil Gizi Lebih</option>
|
||||||
|
<option value="ibu hamil obesitas">Ibu Hamil Obesitas</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="judul" class="col-sm-2 col-form-label">Judul</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" name="judul" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="konten" class="col-sm-2 col-form-label">Konten</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<textarea name="konten" class="form-control" cols="80" rows="8"></textarea>
|
||||||
|
{{-- <input type="text-area" class="form-control" name="konten" required> --}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- <div class="row mb-3">
|
||||||
|
<label for="gambar" class="col-sm-2 col-form-label">Gambar</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="file" class="form-control" name="gambar" required>
|
||||||
|
</div>
|
||||||
|
</div> --}}
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<button type="submit" class="btn btn-primary">Submit Form</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form><!-- End General Form Elements -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
@endsection
|
||||||
|
|
@ -0,0 +1,111 @@
|
||||||
|
@extends('layouts.dashboard')
|
||||||
|
|
||||||
|
@section('title', 'Edit Data Edukasi')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
<div class="pagetitle mb-4">
|
||||||
|
<h1 style="color: #9c3a5b;">Edit Data Edukasi</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-10">
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Edit Data Edukasi</h5>
|
||||||
|
|
||||||
|
<!-- General Form Elements -->
|
||||||
|
<form action="{{ route('edukasi.update', $t_edukasi->id) }}" method="POST" enctype="multipart/form-data">
|
||||||
|
@csrf
|
||||||
|
@method('PUT')
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label class="col-sm-2 col-form-label">Kategori</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
|
||||||
|
<select name="kategori" class="form-control">
|
||||||
|
|
||||||
|
<option value="Resiko Tinggi Stunting"
|
||||||
|
{{ $t_edukasi->kategori == 'Resiko Tinggi Stunting' ? 'selected' : '' }}>
|
||||||
|
Resiko Tinggi Stunting
|
||||||
|
</option>
|
||||||
|
|
||||||
|
<option value="Stunting"
|
||||||
|
{{ $t_edukasi->kategori == 'Stunting' ? 'selected' : '' }}>
|
||||||
|
Stunting
|
||||||
|
</option>
|
||||||
|
|
||||||
|
<option value="Normal"
|
||||||
|
{{ $t_edukasi->kategori == 'Normal' ? 'selected' : '' }}>
|
||||||
|
Normal
|
||||||
|
</option>
|
||||||
|
|
||||||
|
<option value="Resiko Gizi Lebih"
|
||||||
|
{{ $t_edukasi->kategori == 'Resiko Gizi Lebih' ? 'selected' : '' }}>
|
||||||
|
Resiko Gizi Lebih
|
||||||
|
</option>
|
||||||
|
|
||||||
|
<option value="ibu hamil gizi kurang"
|
||||||
|
{{ $t_edukasi->kategori == 'ibu hamil gizi kurang' ? 'selected' : '' }}>
|
||||||
|
Ibu Hamil Gizi Kurang
|
||||||
|
</option>
|
||||||
|
|
||||||
|
<option value="ibu hamil gizi normal"
|
||||||
|
{{ $t_edukasi->kategori == 'ibu hamil gizi normal' ? 'selected' : '' }}>
|
||||||
|
Ibu Hamil Gizi Normal
|
||||||
|
</option>
|
||||||
|
|
||||||
|
<option value="ibu hamil gizi lebih"
|
||||||
|
{{ $t_edukasi->kategori == 'ibu hamil gizi lebih' ? 'selected' : '' }}>
|
||||||
|
Ibu Hamil Gizi Lebih
|
||||||
|
</option>
|
||||||
|
|
||||||
|
<option value="ibu hamil obesitas"
|
||||||
|
{{ $t_edukasi->kategori == 'ibu hamil obesitas' ? 'selected' : '' }}>
|
||||||
|
Ibu Hamil Obesitas
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="judul" class="col-sm-2 col-form-label">Judul</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" name="judul" value="{{ $t_edukasi->judul }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="konten" class="col-sm-2 col-form-label">Konten</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<textarea name="konten" class="form-control" cols="80" rows="8" value="" >{{ $t_edukasi->konten }}</textarea>
|
||||||
|
{{-- <input type="text-area" class="form-control" name="konten" value="{{ $t_edukasi->konten }}"> --}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- <div class="row mb-3">
|
||||||
|
<label class="col-sm-2 col-form-label">Gambar</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
|
||||||
|
@if($t_edukasi->gambar)
|
||||||
|
<img src="{{ asset('storage/'.$t_edukasi->gambar) }}" width="120" class="mb-2">
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<input type="file" name="gambar" class="form-control">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div> --}}
|
||||||
|
<div class="row mb-3">
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<button type="submit" class="btn btn-primary">Submit Form</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form><!-- End General Form Elements -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
@endsection
|
||||||
|
|
@ -0,0 +1,90 @@
|
||||||
|
@extends('layouts.dashboard')
|
||||||
|
|
||||||
|
@section('title', 'Data Edukasi')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
<!-- Page Title -->
|
||||||
|
<div class="pagetitle mb-4">
|
||||||
|
<h1 style="color: #9c3a5b;">Data Edukasi</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Card -->
|
||||||
|
<div class="card shadow-sm">
|
||||||
|
<div class="card-body">
|
||||||
|
|
||||||
|
<!-- Card Header -->
|
||||||
|
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||||
|
<h5 class="card-title mb-0">Daftar Edukasi</h5>
|
||||||
|
|
||||||
|
<a href="{{ route('edukasi.create') }}" class="btn btn-success btn-sm">
|
||||||
|
<i class="bi bi-plus-circle me-1"></i> Tambah Data Edukasi
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Table -->
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-hover align-middle datatable">
|
||||||
|
<thead class="table-light">
|
||||||
|
<tr>
|
||||||
|
<th style="width: 5%">No</th>
|
||||||
|
<th>Kategori</th>
|
||||||
|
<th>Judul</th>
|
||||||
|
<th>Konten</th>
|
||||||
|
{{-- <th>Gambar</th> --}}
|
||||||
|
<th style="width: 15%" class="text-center">Aksi</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@forelse ($t_edukasi as $index => $t_edukasis)
|
||||||
|
<tr>
|
||||||
|
<td>{{ $index + 1 }}</td>
|
||||||
|
<td>{{ $t_edukasis->kategori }}</td>
|
||||||
|
<td>{{ $t_edukasis->judul }}</td>
|
||||||
|
<td>{{ $t_edukasis->konten }}</td>
|
||||||
|
{{-- <td>
|
||||||
|
@if($t_edukasis->gambar)
|
||||||
|
<img src="{{ asset('storage/'.$t_edukasis->gambar) }}" width="100">
|
||||||
|
@else
|
||||||
|
Tidak ada gambar
|
||||||
|
@endif
|
||||||
|
</td> --}}
|
||||||
|
<td class="text-center">
|
||||||
|
|
||||||
|
<!-- Edit -->
|
||||||
|
<a href="{{ route('edukasi.edit', $t_edukasis->id) }}"
|
||||||
|
class="btn btn-sm btn-warning me-1" title="Edit">
|
||||||
|
<i class="bi bi-pencil-square"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<!-- Delete -->
|
||||||
|
<form action="{{ route('edukasi.destroy', $t_edukasis->id) }}"
|
||||||
|
method="POST"
|
||||||
|
style="display:inline;">
|
||||||
|
@csrf
|
||||||
|
@method('DELETE')
|
||||||
|
<button class="btn btn-sm btn-danger"
|
||||||
|
onclick="return confirm('Yakin ingin menghapus data?')"
|
||||||
|
title="Hapus">
|
||||||
|
<i class="bi bi-trash"></i>
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
@empty
|
||||||
|
<tr>
|
||||||
|
<td colspan="7" class="text-center text-muted">
|
||||||
|
Belum ada data edukasi
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforelse
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@endsection
|
||||||
|
|
@ -0,0 +1,69 @@
|
||||||
|
@extends('layouts.dashboard')
|
||||||
|
|
||||||
|
@section('title', 'Form Data Ibu hamil')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
<div class="pagetitle mb-4">
|
||||||
|
<h1 style="color: #9c3a5b;">Form Data Ibu Hamil</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-18">
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Tambah Data Ibu Hamil</h5>
|
||||||
|
|
||||||
|
<!-- General Form Elements -->
|
||||||
|
<form action="{{ route('ibu_hamil.store') }}" method="POST">
|
||||||
|
@csrf
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="nik" class="col-sm-2 col-form-label">NIK</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" name="nik" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="nama" class="col-sm-2 col-form-label">Nama Ibu Hamil</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" name="nama" id="nama" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="tgl_lahir" class="col-sm-2 col-form-label">Tanggal Lahir</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="date" class="form-control" name="tgl_lahir" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="alamat" class="col-sm-2 col-form-label">Alamat</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" name="alamat" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="no_hp" class="col-sm-2 col-form-label">No HP</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="number" class="form-control" name="no_hp" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<button type="submit" class="btn btn-primary">Submit Form</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form><!-- End General Form Elements -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
@endsection
|
||||||
|
|
@ -0,0 +1,84 @@
|
||||||
|
@extends('layouts.dashboard')
|
||||||
|
|
||||||
|
@section('title', 'Data Ibu Hamil')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
<!-- Page Title -->
|
||||||
|
<div class="pagetitle mb-4">
|
||||||
|
<h1 style="color: #9c3a5b;">Data Ibu Hamil</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Card -->
|
||||||
|
<div class="card shadow-sm">
|
||||||
|
<div class="card-body">
|
||||||
|
|
||||||
|
<!-- Card Header -->
|
||||||
|
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||||
|
<h5 class="card-title mb-0">Daftar Ibu Hamil</h5>
|
||||||
|
|
||||||
|
<a href="{{ route('ibu_hamil.create') }}" class="btn btn-success btn-sm">
|
||||||
|
<i class="bi bi-plus-circle me-1"></i> Tambah Data Ibu Hamil
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Table -->
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-hover align-middle datatable">
|
||||||
|
<thead class="table-light">
|
||||||
|
<tr>
|
||||||
|
<th style="width: 5%">No</th>
|
||||||
|
<th>Nama</th>
|
||||||
|
<th>Tanggal Lahir</th>
|
||||||
|
<th>Alamat</th>
|
||||||
|
<th>No HP</th>
|
||||||
|
<th style="width: 15%" class="text-center">Aksi</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@forelse ($ibu_hamil as $index => $ibu_hamils)
|
||||||
|
<tr>
|
||||||
|
<td>{{ $index + 1 }}</td>
|
||||||
|
<td>{{ $ibu_hamils->nama }}</td>
|
||||||
|
<td>{{ $ibu_hamils->tgl_lahir }}</td>
|
||||||
|
<td>{{ $ibu_hamils->alamat }}</td>
|
||||||
|
<td>{{ $ibu_hamils->no_hp }}</td>
|
||||||
|
<td class="text-center">
|
||||||
|
|
||||||
|
<!-- Edit -->
|
||||||
|
<a href="{{ route('ibu_hamil.edit', $ibu_hamils->id) }}"
|
||||||
|
class="btn btn-sm btn-warning me-1" title="Edit">
|
||||||
|
<i class="bi bi-pencil-square"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<!-- Delete -->
|
||||||
|
<form action="{{ route('ibu_hamil.destroy', $ibu_hamils->id) }}"
|
||||||
|
method="POST"
|
||||||
|
style="display:inline;">
|
||||||
|
@csrf
|
||||||
|
@method('DELETE')
|
||||||
|
<button class="btn btn-sm btn-danger"
|
||||||
|
onclick="return confirm('Yakin ingin menghapus data?')"
|
||||||
|
title="Hapus">
|
||||||
|
<i class="bi bi-trash"></i>
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
@empty
|
||||||
|
<tr>
|
||||||
|
<td colspan="7" class="text-center text-muted">
|
||||||
|
Belum ada data ibu hamil
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforelse
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@endsection
|
||||||
|
|
@ -0,0 +1,67 @@
|
||||||
|
@extends('layouts.dashboard')
|
||||||
|
|
||||||
|
@section('title', 'Edit Data Ibu Hamil')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
<div class="pagetitle mb-4">
|
||||||
|
<h1 style="color: #9c3a5b;">Edit Data Ibu Hamil</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-10">
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Edit Data Ibu Hamil</h5>
|
||||||
|
|
||||||
|
<!-- General Form Elements -->
|
||||||
|
<form action="{{ route('ibu_hamil.update', $ibu_hamil->id) }}" method="POST">
|
||||||
|
@csrf
|
||||||
|
@method('PUT')
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="nik" class="col-sm-2 col-form-label">NIK</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" name="nik" value="{{ $ibu_hamil->nik }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="nama" class="col-sm-2 col-form-label">Nama</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" name="nama" value="{{ $ibu_hamil->nama }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="tgl_lahir" class="col-sm-2 col-form-label">Tanggal Lahir</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="date" class="form-control" name="tgl_lahir" value="{{ $ibu_hamil->tgl_lahir }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="alamat" class="col-sm-2 col-form-label">Alamat</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" name="alamat" value="{{ $ibu_hamil->alamat }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="no_hp" class="col-sm-2 col-form-label">NO HP</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" name="no_hp" value="{{ $ibu_hamil->no_hp }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<button type="submit" class="btn btn-primary">Submit Form</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form><!-- End General Form Elements -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
@endsection
|
||||||
|
|
@ -17,8 +17,9 @@
|
||||||
<link href="{{ asset('assets/vendor/quill/quill.bubble.css') }}" rel="stylesheet">
|
<link href="{{ asset('assets/vendor/quill/quill.bubble.css') }}" rel="stylesheet">
|
||||||
<link href="{{ asset('assets/vendor/remixicon/remixicon.css') }}" rel="stylesheet">
|
<link href="{{ asset('assets/vendor/remixicon/remixicon.css') }}" rel="stylesheet">
|
||||||
<link href="{{ asset('assets/vendor/simple-datatables/style.css') }}" rel="stylesheet">
|
<link href="{{ asset('assets/vendor/simple-datatables/style.css') }}" rel="stylesheet">
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
|
||||||
<link href="{{ asset('assets/css/style.css') }}" rel="stylesheet">
|
<link href="{{ asset('assets/css/style.css') }}" rel="stylesheet">
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
html {
|
html {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
|
@ -170,6 +171,7 @@
|
||||||
|
|
||||||
{{-- JS --}}
|
{{-- JS --}}
|
||||||
<script src="{{ asset('assets/js/main.js') }}"></script>
|
<script src="{{ asset('assets/js/main.js') }}"></script>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/apexcharts"></script>
|
||||||
|
|
||||||
@stack('scripts')
|
@stack('scripts')
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
|
|
@ -9,12 +9,14 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
@if(auth()->user()->role == 'admin')
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link collapsed" href="/petugas">
|
<a class="nav-link collapsed" href="/users">
|
||||||
<i class="bi bi-person-circle" style="color: #ff5757;"></i>
|
<i class="bi bi-person-circle" style="color: #ff5757;"></i>
|
||||||
<span style="color: #ff5757;">Data Petugas</span>
|
<span style="color: #ff5757;">Data Pengguna</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
@endif
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link collapsed" href="/balita">
|
<a class="nav-link collapsed" href="/balita">
|
||||||
|
|
@ -24,21 +26,21 @@
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link collapsed" href="/ibu-hamil">
|
<a class="nav-link collapsed" href="/ibu_hamil">
|
||||||
<i class="bi bi-person-check" style="color: #ff5757;"></i>
|
<i class="bi bi-person-check" style="color: #ff5757;"></i>
|
||||||
<span style="color: #ff5757;">Data Ibu Hamil</span>
|
<span style="color: #ff5757;">Data Ibu Hamil</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link collapsed" href="/stunting">
|
<a class="nav-link collapsed" href="/pengukuran_balita">
|
||||||
<i class="bi bi-graph-down" style="color: #ff5757;"></i>
|
<i class="bi bi-graph-down" style="color: #ff5757;"></i>
|
||||||
<span style="color: #ff5757;">Pengukuran Balita</span>
|
<span style="color: #ff5757;">Pengukuran Balita</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link collapsed" href="/stunting">
|
<a class="nav-link collapsed" href="/pengukuran_ibu_hamil">
|
||||||
<i class="bi bi-graph-down" style="color: #ff5757;"></i>
|
<i class="bi bi-graph-down" style="color: #ff5757;"></i>
|
||||||
<span style="color: #ff5757;">Pengukuran Ibu Hamil</span>
|
<span style="color: #ff5757;">Pengukuran Ibu Hamil</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
@ -51,15 +53,15 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="nav-item">
|
{{-- <li class="nav-item">
|
||||||
<a class="nav-link collapsed" href="pages-contact.html">
|
<a class="nav-link collapsed" href="pages-contact.html">
|
||||||
<i class="bi bi-broadcast-pin" style="color: #ff5757;"></i>
|
<i class="bi bi-broadcast-pin" style="color: #ff5757;"></i>
|
||||||
<span style="color: #ff5757;">Pengaturan Informasi</span>
|
<span style="color: #ff5757;">Pengaturan Informasi</span>
|
||||||
</a>
|
</a>
|
||||||
</li><!-- End Contact Page Nav -->
|
</li><!-- End Contact Page Nav --> --}}
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link collapsed" href="pages-contact.html">
|
<a class="nav-link collapsed" href="/edukasi">
|
||||||
<i class="bi bi-clipboard-plus" style="color: #ff5757;"></i>
|
<i class="bi bi-clipboard-plus" style="color: #ff5757;"></i>
|
||||||
<span style="color: #ff5757;">Template Edukasi</span>
|
<span style="color: #ff5757;">Template Edukasi</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,123 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Laporan Edukasi Ibu Hamil</title>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
body{
|
||||||
|
font-family: DejaVu Sans, sans-serif;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2{
|
||||||
|
text-align:center;
|
||||||
|
margin-bottom:5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subjudul{
|
||||||
|
text-align:center;
|
||||||
|
margin-bottom:20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table{
|
||||||
|
width:100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
margin-top:10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table th, table td{
|
||||||
|
border:1px solid #000;
|
||||||
|
padding:6px;
|
||||||
|
text-align:center;
|
||||||
|
}
|
||||||
|
|
||||||
|
table th{
|
||||||
|
background:#f2f2f2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section{
|
||||||
|
margin-top:25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.edukasi{
|
||||||
|
margin-bottom:10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.edukasi b{
|
||||||
|
font-size:13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2>Laporan Hasil dan Edukasi Ibu Hamil</h2>
|
||||||
|
<p class="">Keterangan:</p>
|
||||||
|
<p>BB: Berat Badan</p>
|
||||||
|
<p>TB: Tinggi Badan</p>
|
||||||
|
<p>LILA: Lingkar Lengan</p>
|
||||||
|
<h3>Hasil Pengukuran</h3>
|
||||||
|
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Petugas</th>
|
||||||
|
<th>Tanggal</th>
|
||||||
|
<th>Nama</th>
|
||||||
|
<th>Usia</th>
|
||||||
|
<th>BB</th>
|
||||||
|
<th>TB</th>
|
||||||
|
<th>LILA</th>
|
||||||
|
<th>Usia Kehamilan</th>
|
||||||
|
<th>IMT</th>
|
||||||
|
<th>Status Gizi</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>{{ $pengukuran->petugas->nama ?? '-' }}</td>
|
||||||
|
<td>{{ $pengukuran->tanggal }}</td>
|
||||||
|
<td>{{ $pengukuran->ibuHamil->nama ?? '-' }}</td>
|
||||||
|
<td>{{ \Carbon\Carbon::parse($pengukuran->ibuHamil->tgl_lahir)->age ?? '-' }}</td>
|
||||||
|
<td>{{ $pengukuran->berat_badan }}</td>
|
||||||
|
<td>{{ $pengukuran->tinggi_badan }}</td>
|
||||||
|
<td>{{ $pengukuran->lila }}</td>
|
||||||
|
<td>{{ $pengukuran->usia_kehamilan }}</td>
|
||||||
|
<td>{{ $pengukuran->imt }}</td>
|
||||||
|
<td>{{ $pengukuran->status_gizi }}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
<h3>Grafik Perkembangan Pengukuran</h3>
|
||||||
|
@if(!empty($chartImage))
|
||||||
|
<img src="{{ $chartImage }}" style="width:100%;">
|
||||||
|
@else
|
||||||
|
<p>Grafik tidak tersedia</p>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
<h3>Edukasi dan Informasi</h3>
|
||||||
|
|
||||||
|
@forelse($edukasi as $item)
|
||||||
|
|
||||||
|
<div class="edukasi">
|
||||||
|
<b>{{ $item->judul }}</b>
|
||||||
|
<p>{{ $item->konten }}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@empty
|
||||||
|
<p>Edukasi belum tersedia</p>
|
||||||
|
@endforelse
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,95 @@
|
||||||
|
@extends('layouts.dashboard')
|
||||||
|
|
||||||
|
@section('title', 'Data Pengukuran Balta')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
<!-- Page Title -->
|
||||||
|
<div class="pagetitle mb-4">
|
||||||
|
<h1 style="color: #9c3a5b;">Data Pengukuran Balita</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Card -->
|
||||||
|
<div class="card shadow-sm">
|
||||||
|
<div class="card-body">
|
||||||
|
|
||||||
|
<!-- Card Header -->
|
||||||
|
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||||
|
<h5 class="card-title mb-0">Daftar Hasil Pengukuran</h5>
|
||||||
|
|
||||||
|
<a href="{{ route('pengukuran_balita.create') }}" class="btn btn-success btn-sm">
|
||||||
|
<i class="bi bi-plus-circle me-1"></i> Tambah Pengukuran
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Table -->
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-hover align-middle datatable">
|
||||||
|
<thead class="table-light">
|
||||||
|
<tr>
|
||||||
|
<th style="width: 5%" >No</th>
|
||||||
|
<th>Petugas</th>
|
||||||
|
<th>Tanggal</th>
|
||||||
|
<th>Nama</th>
|
||||||
|
<th>Usia</th>
|
||||||
|
<th>Berat Badan</th>
|
||||||
|
<th>Tinggi Badan</th>
|
||||||
|
<th>Lingkar Kepala</th>
|
||||||
|
<th>Hasil</th>
|
||||||
|
<th>Z-score TBU</th>
|
||||||
|
<th style="width: 15%" class="text-center">Aksi</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{{-- @forelse ($p_ibuhamil as $index => $ibu) --}}
|
||||||
|
<tr>
|
||||||
|
{{-- <td>{{ $index + 1 }}</td>
|
||||||
|
<td>{{ $ibu->petugas->nama ?? '-' }}</td>
|
||||||
|
<td>{{ $ibu->tanggal }}</td>
|
||||||
|
<td>{{ $ibu->ibuHamil->nama ?? '-' }}</td>
|
||||||
|
<td>{{ \Carbon\Carbon::parse($ibu->ibuHamil->tgl_lahir)->age ?? '-' }}</td>
|
||||||
|
<td>{{ $ibu->berat_badan }}</td>
|
||||||
|
<td>{{ $ibu->tinggi_badan }}</td>
|
||||||
|
<td>{{ $ibu->lila }}</td>
|
||||||
|
<td class="text-center">{{ $ibu->usia_kehamilan }}</td>
|
||||||
|
<td>{{ $ibu->imt }}</td>
|
||||||
|
<td>{{ $ibu->status_gizi }}</td> --}}
|
||||||
|
{{-- <td class="text-center">
|
||||||
|
<!-- Detail -->
|
||||||
|
<a href="{{ route('pengukuran_ibu_hamil.detail', $ibu->id) }}"
|
||||||
|
class="btn btn-sm btn-info"
|
||||||
|
title="Detail">
|
||||||
|
<i class="bi bi-eye"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<!-- Delete -->
|
||||||
|
<form action="{{ route('pengukuran_ibu_hamil.destroy', $ibu->id) }}"
|
||||||
|
method="POST"
|
||||||
|
style="display:inline;">
|
||||||
|
@csrf
|
||||||
|
@method('DELETE')
|
||||||
|
<button class="btn btn-sm btn-danger"
|
||||||
|
onclick="return confirm('Yakin ingin menghapus data?')"
|
||||||
|
title="Hapus">
|
||||||
|
<i class="bi bi-trash"></i>
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</td> --}}
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
{{-- @empty --}}
|
||||||
|
<tr>
|
||||||
|
<td colspan="12" class="text-center text-muted">
|
||||||
|
Belum ada data pengukuran
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{{-- @endforelse --}}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@endsection
|
||||||
|
|
@ -0,0 +1,124 @@
|
||||||
|
@extends('layouts.dashboard')
|
||||||
|
|
||||||
|
@section('title', 'Pengukuran Ibu Hamil')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
<div class="pagetitle mb-4">
|
||||||
|
<h1 style="color: #9c3a5b;">Form Pengukuran Ibu Hamil</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-10">
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Tambah Data Pengukuran</h5>
|
||||||
|
|
||||||
|
<!-- General Form Elements -->
|
||||||
|
@if ($errors->any())
|
||||||
|
<div class="alert alert-danger">
|
||||||
|
<ul>
|
||||||
|
@foreach ($errors->all() as $error)
|
||||||
|
<li>{{ $error }}</li>
|
||||||
|
@endforeach
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
<form action="{{ route('pengukuran_ibu_hamil.store') }}" method="POST">
|
||||||
|
@csrf
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="tanggal" class="col-sm-2 col-form-label">Tanggal</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="date" class="form-control" name="tanggal" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label class="col-sm-2 col-form-label">Nama</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<select name="ibu_hamil_id" id="ibu_id" class="form-control select2" required>
|
||||||
|
<option value="">-- Pilih Ibu Hamil --</option>
|
||||||
|
|
||||||
|
@foreach($ibu_hamil as $ibu)
|
||||||
|
<option value="{{ $ibu->id }}" data-tgl="{{ $ibu->tgl_lahir }}">
|
||||||
|
{{ $ibu->nama }}
|
||||||
|
</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="nama" class="col-sm-2 col-form-label">Usia</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" id="usia" name="usia" class="form-control" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="berat_badan" class="col-sm-2 col-form-label">Berat Badan</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="number" class="form-control" name="berat_badan" required placeholder="kg">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="tinggi_badan" class="col-sm-2 col-form-label">Tinggi Badan</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="number" class="form-control" name="tinggi_badan" required placeholder="cm">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="lila" class="col-sm-2 col-form-label">Lila</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="number" class="form-control" name="lila" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="usia_kehamilan" class="col-sm-2 col-form-label">Usia Kehamilan</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="number" class="form-control" name="usia_kehamilan" required placeholder="minggu">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<button type="submit" class="btn btn-primary">Submit Form</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form><!-- End General Form Elements -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.getElementById("ibu_id").addEventListener("change", function() {
|
||||||
|
|
||||||
|
let selected = this.options[this.selectedIndex];
|
||||||
|
let tgl_lahir = selected.getAttribute("data-tgl");
|
||||||
|
|
||||||
|
if(tgl_lahir){
|
||||||
|
|
||||||
|
let lahir = new Date(tgl_lahir);
|
||||||
|
let today = new Date();
|
||||||
|
|
||||||
|
let usia = today.getFullYear() - lahir.getFullYear();
|
||||||
|
let m = today.getMonth() - lahir.getMonth();
|
||||||
|
|
||||||
|
if (m < 0 || (m === 0 && today.getDate() < lahir.getDate())) {
|
||||||
|
usia--;
|
||||||
|
}
|
||||||
|
|
||||||
|
document.getElementById("usia").value = usia;
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
@endsection
|
||||||
|
|
@ -0,0 +1,96 @@
|
||||||
|
@extends('layouts.dashboard')
|
||||||
|
|
||||||
|
@section('title', 'Data Pengukuran Ibu Hamil')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
<!-- Page Title -->
|
||||||
|
<div class="pagetitle mb-4">
|
||||||
|
<h1 style="color: #9c3a5b;">Data Pengukuran Ibu Hamil</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Card -->
|
||||||
|
<div class="card shadow-sm">
|
||||||
|
<div class="card-body">
|
||||||
|
|
||||||
|
<!-- Card Header -->
|
||||||
|
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||||
|
<h5 class="card-title mb-0">Daftar Hasil Pengukuran</h5>
|
||||||
|
|
||||||
|
<a href="{{ route('pengukuran_ibu_hamil.create') }}" class="btn btn-success btn-sm">
|
||||||
|
<i class="bi bi-plus-circle me-1"></i> Tambah Pengukuran
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Table -->
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-hover align-middle datatable">
|
||||||
|
<thead class="table-light">
|
||||||
|
<tr>
|
||||||
|
<th style="width: 5%" >No</th>
|
||||||
|
<th>Petugas</th>
|
||||||
|
<th>Tanggal</th>
|
||||||
|
<th>Nama</th>
|
||||||
|
<th>Usia</th>
|
||||||
|
<th>Berat Badan</th>
|
||||||
|
<th>Tinggi Badan</th>
|
||||||
|
<th>Lila</th>
|
||||||
|
<th>Usia Kehamilan</th>
|
||||||
|
<th>IMT</th>
|
||||||
|
<th>Status Gizi</th>
|
||||||
|
<th style="width: 15%" class="text-center">Aksi</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@forelse ($p_ibuhamil as $index => $ibu)
|
||||||
|
<tr>
|
||||||
|
<td>{{ $index + 1 }}</td>
|
||||||
|
<td>{{ $ibu->petugas->nama ?? '-' }}</td>
|
||||||
|
<td>{{ $ibu->tanggal }}</td>
|
||||||
|
<td>{{ $ibu->ibuHamil->nama ?? '-' }}</td>
|
||||||
|
<td>{{ \Carbon\Carbon::parse($ibu->ibuHamil->tgl_lahir)->age ?? '-' }}</td>
|
||||||
|
<td>{{ $ibu->berat_badan }}</td>
|
||||||
|
<td>{{ $ibu->tinggi_badan }}</td>
|
||||||
|
<td>{{ $ibu->lila }}</td>
|
||||||
|
<td class="text-center">{{ $ibu->usia_kehamilan }}</td>
|
||||||
|
<td>{{ $ibu->imt }}</td>
|
||||||
|
<td>{{ $ibu->status_gizi }}</td>
|
||||||
|
<td class="text-center">
|
||||||
|
<!-- Detail -->
|
||||||
|
<a href="{{ route('pengukuran_ibu_hamil.detail', $ibu->id) }}"
|
||||||
|
class="btn btn-sm btn-info"
|
||||||
|
title="Detail">
|
||||||
|
<i class="bi bi-eye"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<!-- Delete -->
|
||||||
|
<form action="{{ route('pengukuran_ibu_hamil.destroy', $ibu->id) }}"
|
||||||
|
method="POST"
|
||||||
|
style="display:inline;">
|
||||||
|
@csrf
|
||||||
|
@method('DELETE')
|
||||||
|
<button class="btn btn-sm btn-danger"
|
||||||
|
onclick="return confirm('Yakin ingin menghapus data?')"
|
||||||
|
title="Hapus">
|
||||||
|
<i class="bi bi-trash"></i>
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
@empty
|
||||||
|
<tr>
|
||||||
|
<td colspan="12" class="text-center text-muted">
|
||||||
|
Belum ada data pengukuran
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforelse
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@endsection
|
||||||
|
|
@ -0,0 +1,144 @@
|
||||||
|
@extends('layouts.dashboard')
|
||||||
|
|
||||||
|
@section('title','Detail Edukasi Ibu Hamil')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
<div class="pagetitle">
|
||||||
|
<h1>Detail Edukasi</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="row align-items-top">
|
||||||
|
<div class="col-lg-13">
|
||||||
|
|
||||||
|
<!-- Default Card -->
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<form id="formPdf" action="/cetak-ibu-hamil/{{ $pengukuran->id }}" method="POST">
|
||||||
|
@csrf
|
||||||
|
|
||||||
|
<input type="hidden" name="chartImage" id="chartImage">
|
||||||
|
|
||||||
|
<button type="submit" class="btn btn-danger">
|
||||||
|
Cetak PDF
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<h5 class="card-title">Hasil Pengukuran</h5>
|
||||||
|
|
||||||
|
<!-- Table -->
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-hover align-middle datatable">
|
||||||
|
<thead class="table-light">
|
||||||
|
<tr>
|
||||||
|
<th>Petugas</th>
|
||||||
|
<th>Tanggal</th>
|
||||||
|
<th>Nama</th>
|
||||||
|
<th>Usia</th>
|
||||||
|
<th>Berat Badan</th>
|
||||||
|
<th>Tinggi Badan</th>
|
||||||
|
<th>Lila</th>
|
||||||
|
<th>Usia Kehamilan</th>
|
||||||
|
<th>IMT</th>
|
||||||
|
<th>Status Gizi</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>{{ $pengukuran->petugas->nama ?? '-' }}</td>
|
||||||
|
<td>{{ $pengukuran->tanggal }}</td>
|
||||||
|
<td>{{ $pengukuran->ibuHamil->nama ?? '-' }}</td>
|
||||||
|
<td>{{ \Carbon\Carbon::parse($pengukuran->ibuHamil->tgl_lahir)->age ?? '-' }}</td>
|
||||||
|
<td>{{ $pengukuran->berat_badan }}</td>
|
||||||
|
<td>{{ $pengukuran->tinggi_badan }}</td>
|
||||||
|
<td>{{ $pengukuran->lila }}</td>
|
||||||
|
<td class="text-center">{{ $pengukuran->usia_kehamilan }}</td>
|
||||||
|
<td>{{ $pengukuran->imt }}</td>
|
||||||
|
<td>{{ $pengukuran->status_gizi }}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Grafik Perkembangan -->
|
||||||
|
<h5 class="card-title">Grafik Perkembangan Pengukuran Ibu Hamil</h5>
|
||||||
|
|
||||||
|
<div id="grafikIbuHamil" style="min-height:350px;"></div>
|
||||||
|
<hr>
|
||||||
|
<h5 class="card-title">Edukasi dan Informasi</h5>
|
||||||
|
@forelse($edukasi as $item)
|
||||||
|
<b>{{ $item->judul }}</b>
|
||||||
|
<p>{{ $item->konten }}</p>
|
||||||
|
@empty
|
||||||
|
<p class="text-danger">Edukasi belum tersedia</p>
|
||||||
|
@endforelse
|
||||||
|
</div>
|
||||||
|
</div><!-- End Default Card -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/apexcharts"></script>
|
||||||
|
<script>
|
||||||
|
document.addEventListener("DOMContentLoaded", function () {
|
||||||
|
|
||||||
|
var tanggal = @json($tanggal ?? []);
|
||||||
|
var bb = @json($bb ?? []);
|
||||||
|
var imt = @json($imt ?? []);
|
||||||
|
|
||||||
|
var options = {
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: 'Berat Badan',
|
||||||
|
data: bb
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'IMT',
|
||||||
|
data: imt
|
||||||
|
}
|
||||||
|
],
|
||||||
|
chart: {
|
||||||
|
type: 'line',
|
||||||
|
height: 350
|
||||||
|
},
|
||||||
|
stroke: {
|
||||||
|
curve: 'smooth',
|
||||||
|
width: 3
|
||||||
|
},
|
||||||
|
markers: {
|
||||||
|
size: 6
|
||||||
|
},
|
||||||
|
xaxis: {
|
||||||
|
categories: tanggal
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
shared: false,
|
||||||
|
intersect: true
|
||||||
|
},
|
||||||
|
colors: ['#2ecc71','#ff7f32']
|
||||||
|
};
|
||||||
|
|
||||||
|
// ✅ WAJIB: buat chart
|
||||||
|
var chart = new ApexCharts(document.querySelector("#grafikIbuHamil"), options);
|
||||||
|
|
||||||
|
chart.render();
|
||||||
|
|
||||||
|
// ✅ handle submit
|
||||||
|
document.getElementById("formPdf").addEventListener("submit", function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
chart.dataURI().then(({ imgURI }) => {
|
||||||
|
document.getElementById("chartImage").value = imgURI;
|
||||||
|
|
||||||
|
e.target.submit(); // submit ulang setelah gambar siap
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
@endsection
|
||||||
|
|
@ -1,77 +0,0 @@
|
||||||
@extends('layouts.dashboard')
|
|
||||||
|
|
||||||
@section('title', 'Data Petugas')
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
<div class="pagetitle mb-4">
|
|
||||||
<h1 style="color: #9c3a5b;">Data Petugas</h1>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card shadow-sm">
|
|
||||||
<div class="card-body">
|
|
||||||
|
|
||||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
|
||||||
<h5 class="card-title mb-0">Daftar Petugas</h5>
|
|
||||||
|
|
||||||
<a href="{{ url('tambah-petugas') }}" class="btn btn-success btn-sm">
|
|
||||||
<i class="bi bi-plus-circle me-1"></i> Tambah Petugas
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="datatable-wrapper">
|
|
||||||
<div class="table-responsive">
|
|
||||||
<table class="table table-hover align-middle datatable">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th style="width: 5%">No</th>
|
|
||||||
<th>Nama</th>
|
|
||||||
<th>Email</th>
|
|
||||||
<th style="width: 15%">Role</th>
|
|
||||||
<th style="width: 15%" class="text-center">Aksi</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>1</td>
|
|
||||||
<td>Dewi Lestari</td>
|
|
||||||
<td>dewi@example.com</td>
|
|
||||||
<td>
|
|
||||||
<span class="badge bg-primary">Admin</span>
|
|
||||||
</td>
|
|
||||||
<td class="text-center">
|
|
||||||
<button class="btn btn-sm btn-warning me-1" title="Edit">
|
|
||||||
<i class="bi bi-pencil-square"></i>
|
|
||||||
</button>
|
|
||||||
<button class="btn btn-sm btn-danger" title="Hapus">
|
|
||||||
<i class="bi bi-trash"></i>
|
|
||||||
</button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>2</td>
|
|
||||||
<td>Agus Prabowo</td>
|
|
||||||
<td>agus@example.com</td>
|
|
||||||
<td>
|
|
||||||
<span class="badge bg-secondary">Petugas</span>
|
|
||||||
</td>
|
|
||||||
<td class="text-center">
|
|
||||||
<button class="btn btn-sm btn-warning me-1">
|
|
||||||
<i class="bi bi-pencil-square"></i>
|
|
||||||
</button>
|
|
||||||
<button class="btn btn-sm btn-danger">
|
|
||||||
<i class="bi bi-trash"></i>
|
|
||||||
</button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
|
|
@ -0,0 +1,73 @@
|
||||||
|
@extends('layouts.dashboard')
|
||||||
|
|
||||||
|
@section('title', 'Form Data Petugas')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
<div class="pagetitle mb-4">
|
||||||
|
<h1 style="color: #9c3a5b;">Form Data Petugas</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-18">
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Tambah Data Petugas</h5>
|
||||||
|
|
||||||
|
<!-- General Form Elements -->
|
||||||
|
<form action="{{ route('users.store') }}" method="POST">
|
||||||
|
@csrf
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="nama" class="col-sm-2 col-form-label">Nama</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" name="nama" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="no_hp" class="col-sm-2 col-form-label">No HP</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" name="no_hp" id="no_hp" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="email" class="col-sm-2 col-form-label">Email</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="email" class="form-control" name="email" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="password" class="col-sm-2 col-form-label">Password</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="password" class="form-control" name="password" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="no_hp" class="col-sm-2 col-form-label">Role</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<select name="role" class="form-control" required>
|
||||||
|
<option value="">-- Pilih Role --</option>
|
||||||
|
<option value="admin">Admin</option>
|
||||||
|
<option value="petugas">Petugas</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<button type="submit" class="btn btn-primary">Submit Form</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form><!-- End General Form Elements -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
@endsection
|
||||||
|
|
@ -0,0 +1,72 @@
|
||||||
|
@extends('layouts.dashboard')
|
||||||
|
|
||||||
|
@section('title', 'Edit Data Petugas')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
<div class="pagetitle mb-4">
|
||||||
|
<h1 style="color: #9c3a5b;">Edit Data Petugas</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-10">
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Edit Data Petugas</h5>
|
||||||
|
|
||||||
|
<!-- General Form Elements -->
|
||||||
|
<form action="{{ route('users.update', $user->id) }}" method="POST">
|
||||||
|
@csrf
|
||||||
|
@method('PUT')
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="nama" class="col-sm-2 col-form-label">Nama</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" name="nama" value="{{ $user->nama }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="no_hp" class="col-sm-2 col-form-label">No HP</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" name="no_hp" value="{{ $user->no_hp }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="email" class="col-sm-2 col-form-label">Email</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="email" class="form-control" name="email" value="{{ $user->email }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="password" class="col-sm-2 col-form-label">Password</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="password" name="password" class="form-control">
|
||||||
|
<small class="text-muted">Kosongkan jika tidak ingin mengganti password</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label class="col-sm-2 col-form-label">Role</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<select name="role" class="form-control" required>
|
||||||
|
<option value="admin" {{ $user->role == 'admin' ? 'selected' : '' }}>Admin</option>
|
||||||
|
<option value="petugas" {{ $user->role == 'petugas' ? 'selected' : '' }}>Petugas</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-3">
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<button type="submit" class="btn btn-primary">Submit Form</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form><!-- End General Form Elements -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
@endsection
|
||||||
|
|
@ -0,0 +1,84 @@
|
||||||
|
@extends('layouts.dashboard')
|
||||||
|
|
||||||
|
@section('title', 'Data Pengguna')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
<!-- Page Title -->
|
||||||
|
<div class="pagetitle mb-4">
|
||||||
|
<h1 style="color: #9c3a5b;">Data Pengguna</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Card -->
|
||||||
|
<div class="card shadow-sm">
|
||||||
|
<div class="card-body">
|
||||||
|
|
||||||
|
<!-- Card Header -->
|
||||||
|
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||||
|
<h5 class="card-title mb-0">Daftar Pengguna</h5>
|
||||||
|
|
||||||
|
<a href="{{ route('users.create') }}" class="btn btn-success btn-sm">
|
||||||
|
<i class="bi bi-plus-circle me-1"></i> Tambah Data Petugas
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Table -->
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-hover align-middle datatable">
|
||||||
|
<thead class="table-light">
|
||||||
|
<tr>
|
||||||
|
<th style="width: 5%">No</th>
|
||||||
|
<th>Nama</th>
|
||||||
|
<th>No HP</th>
|
||||||
|
<th>Email</th>
|
||||||
|
<th>Role</th>
|
||||||
|
<th style="width: 15%" class="text-center">Aksi</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@forelse ($user as $index => $users)
|
||||||
|
<tr>
|
||||||
|
<td>{{ $index + 1 }}</td>
|
||||||
|
<td>{{ $users->nama }}</td>
|
||||||
|
<td>{{ $users->no_hp }}</td>
|
||||||
|
<td>{{ $users->email }}</td>
|
||||||
|
<td>{{ $users->role }}</td>
|
||||||
|
<td class="text-center">
|
||||||
|
|
||||||
|
<!-- Edit -->
|
||||||
|
<a href="{{ route('users.edit', $users->id) }}"
|
||||||
|
class="btn btn-sm btn-warning me-1" title="Edit">
|
||||||
|
<i class="bi bi-pencil-square"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<!-- Delete -->
|
||||||
|
<form action="{{ route('users.destroy', $users->id) }}"
|
||||||
|
method="POST"
|
||||||
|
style="display:inline;">
|
||||||
|
@csrf
|
||||||
|
@method('DELETE')
|
||||||
|
<button class="btn btn-sm btn-danger"
|
||||||
|
onclick="return confirm('Yakin ingin menghapus data?')"
|
||||||
|
title="Hapus">
|
||||||
|
<i class="bi bi-trash"></i>
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
@empty
|
||||||
|
<tr>
|
||||||
|
<td colspan="7" class="text-center text-muted">
|
||||||
|
Belum ada data petugas
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforelse
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@endsection
|
||||||
|
|
@ -4,6 +4,12 @@
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
use App\Http\Controllers\AnakController;
|
use App\Http\Controllers\AnakController;
|
||||||
use App\Http\Controllers\AuthController;
|
use App\Http\Controllers\AuthController;
|
||||||
|
use App\Http\Controllers\DashboardController;
|
||||||
|
use App\Http\Controllers\EdukasiController;
|
||||||
|
use App\Http\Controllers\IbuHamilController;
|
||||||
|
use App\Http\Controllers\PengukuranBalitaController;
|
||||||
|
use App\Http\Controllers\PengukuranIbuHamilController;
|
||||||
|
use App\Http\Controllers\UsersController;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
@ -20,16 +26,45 @@
|
||||||
return view('landingPage.index');
|
return view('landingPage.index');
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::get('/register', [AuthController::class, 'showRegister']);
|
// Route::get('/register', [AuthController::class, 'showRegister']);
|
||||||
Route::get('/login', [AuthController::class, 'showLogin']);
|
// Route::get('/login', [AuthController::class, 'showLogin']);
|
||||||
|
|
||||||
Route::get('/dashboard', function () {
|
Route::get('/login', function () {
|
||||||
return view('dashboard.index');
|
return view('auth.login');
|
||||||
|
})->name('login');
|
||||||
|
|
||||||
|
Route::post('/proseslogin', [AuthController::class, 'login']);
|
||||||
|
|
||||||
|
Route::post('/logout', [AuthController::class, 'logout'])->name('logout');
|
||||||
|
|
||||||
|
Route::get('/dashboard', [DashboardController::class, 'index'])->name('dashboard');
|
||||||
|
|
||||||
|
Route::middleware(['auth'])->group(function () {
|
||||||
|
Route::resource('balita', AnakController::class);
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::get('/petugas', function () {
|
Route::middleware(['auth'])->group(function () {
|
||||||
return view('petugas.data-petugas');
|
Route::resource('ibu_hamil', IbuHamilController::class);
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::resource('balita', AnakController::class);
|
Route::middleware(['auth'])->group(function () {
|
||||||
|
Route::resource('edukasi', EdukasiController::class);
|
||||||
|
});
|
||||||
|
|
||||||
|
Route::middleware(['auth','role:admin'])->group(function () {
|
||||||
|
Route::resource('users', UsersController::class);
|
||||||
|
});
|
||||||
|
|
||||||
|
Route::middleware(['auth'])->group(function () {
|
||||||
|
Route::resource('pengukuran_ibu_hamil', PengukuranIbuHamilController::class);
|
||||||
|
});
|
||||||
|
|
||||||
|
Route::get('/pengukuran-ibu-hamil/{id}/detail',
|
||||||
|
[PengukuranIbuHamilController::class, 'detail'])
|
||||||
|
->name('pengukuran_ibu_hamil.detail');
|
||||||
|
|
||||||
|
Route::post('/cetak-ibu-hamil/{id}', [PengukuranIbuHamilController::class, 'cetakPdf']);
|
||||||
|
|
||||||
|
Route::middleware(['auth'])->group(function () {
|
||||||
|
Route::resource('pengukuran_balita', PengukuranBalitaController::class);
|
||||||
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue