feat: implement Kependudukan menu with CRUD admin pages
- Add Distribusi Umur admin pages (list, create, edit) - Add Data Banjar admin pages (list, create, edit) - Add Migrasi Penduduk admin pages (list, create, edit) - Update state management with full CRUD operations for all modules - Add Kependudukan menu to admin sidebar (devBar, navBar, role1) - Add public pages for Distribusi Umur with age range sorting - Update Dinamika Penduduk to use real-time birth/death data - Add Biome configuration for code linting - Create API routes for all Kependudukan modules Features: - Pagination and search for all admin list pages - Responsive design (table for desktop, cards for mobile) - Delete confirmation modal - Toast notifications for user feedback - Zod validation for all forms - Age range auto-sorting in public Distribusi Umur chart Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
import Elysia, { t } from "elysia";
|
||||
import migrasiPendudukFindUnique from "./findUnique";
|
||||
import migrasiPendudukUpdate from "./updt";
|
||||
import migrasiPendudukFindMany from "./findMany";
|
||||
import migrasiPendudukCreate from "./create";
|
||||
import migrasiPendudukDelete from "./del";
|
||||
|
||||
const MigrasiPenduduk = new Elysia({
|
||||
prefix: "/migrasipenduduk",
|
||||
tags: ["Kependudukan/Migrasi Penduduk"],
|
||||
})
|
||||
.get("/:id", async (context) => {
|
||||
const response = await migrasiPendudukFindUnique(new Request(context.request))
|
||||
return response
|
||||
})
|
||||
.get("/find-many", migrasiPendudukFindMany)
|
||||
.post("/create", migrasiPendudukCreate, {
|
||||
body: t.Object({
|
||||
jenis: t.String(),
|
||||
nama: t.String(),
|
||||
tanggal: t.String(),
|
||||
asalTujuan: t.String(),
|
||||
alasan: t.Optional(t.String()),
|
||||
jenisKelamin: t.Optional(t.String()),
|
||||
}),
|
||||
})
|
||||
.put("/:id", migrasiPendudukUpdate, {
|
||||
params: t.Object({
|
||||
id: t.String(),
|
||||
}),
|
||||
body: t.Object({
|
||||
jenis: t.String(),
|
||||
nama: t.String(),
|
||||
tanggal: t.String(),
|
||||
asalTujuan: t.String(),
|
||||
alasan: t.Optional(t.String()),
|
||||
jenisKelamin: t.Optional(t.String()),
|
||||
}),
|
||||
})
|
||||
.delete("/del/:id", migrasiPendudukDelete, {
|
||||
params: t.Object({
|
||||
id: t.String(),
|
||||
}),
|
||||
})
|
||||
export default MigrasiPenduduk;
|
||||
Reference in New Issue
Block a user