Add Layanan Polsek submenu polsek terdekat
Seeder menu keamanan -> menu ekonomi submenu : demografi pekerjaan, junlah pengangguran, lowongan kerja lokal, pasar desa, program kemiskinan, sektor unggulan, struktur organisasi
This commit is contained in:
@@ -27,8 +27,25 @@ import {
|
||||
IconFiretruck,
|
||||
IconBuilding,
|
||||
IconAlertTriangle,
|
||||
|
||||
// ===== Tambahan =====
|
||||
IconLifebuoy,
|
||||
IconRun,
|
||||
IconShield,
|
||||
IconPhoneCall,
|
||||
IconFirstAidKit,
|
||||
IconStethoscope,
|
||||
IconBuildingCommunity,
|
||||
IconFileText,
|
||||
IconInfoCircle,
|
||||
IconMessageReport,
|
||||
IconUsers,
|
||||
IconQuestionMark,
|
||||
} from '@tabler/icons-react'
|
||||
|
||||
/* =======================
|
||||
Icon Keys (DB Safe)
|
||||
======================= */
|
||||
export type IconKey =
|
||||
| 'ekowisata'
|
||||
| 'kompetisi'
|
||||
@@ -50,14 +67,33 @@ export type IconKey =
|
||||
| 'pelatihan'
|
||||
| 'subsidi'
|
||||
| 'layananKesehatan'
|
||||
|
||||
// ===== Keamanan & Darurat =====
|
||||
| 'polisi'
|
||||
| 'ambulans'
|
||||
| 'pemadam'
|
||||
| 'rumahSakit'
|
||||
| 'bangunan'
|
||||
| 'darurat'
|
||||
| 'sar'
|
||||
| 'evakuasi'
|
||||
| 'keamanan'
|
||||
| 'teleponDarurat'
|
||||
|
||||
// ===== Kesehatan =====
|
||||
| 'rumahSakit'
|
||||
| 'puskesmas'
|
||||
| 'klinik'
|
||||
|
||||
// ===== Pemerintahan =====
|
||||
| 'bangunan'
|
||||
| 'kantorDesa'
|
||||
| 'administrasi'
|
||||
| 'informasi'
|
||||
| 'pengaduan'
|
||||
| 'layananPublik'
|
||||
|
||||
/* =======================
|
||||
Icon Map
|
||||
======================= */
|
||||
const iconMap: Record<IconKey, React.FC<any>> = {
|
||||
ekowisata: IconLeaf,
|
||||
kompetisi: IconTrophy,
|
||||
@@ -79,22 +115,45 @@ const iconMap: Record<IconKey, React.FC<any>> = {
|
||||
pelatihan: IconSchool,
|
||||
subsidi: IconShoppingCart,
|
||||
layananKesehatan: IconHospital,
|
||||
|
||||
// ===== Keamanan & Darurat =====
|
||||
polisi: IconShieldFilled,
|
||||
ambulans: IconAmbulance,
|
||||
pemadam: IconFiretruck,
|
||||
darurat: IconAlertTriangle,
|
||||
sar: IconLifebuoy,
|
||||
evakuasi: IconRun,
|
||||
keamanan: IconShield,
|
||||
teleponDarurat: IconPhoneCall,
|
||||
|
||||
// ===== Kesehatan =====
|
||||
rumahSakit: IconHospital,
|
||||
puskesmas: IconFirstAidKit,
|
||||
klinik: IconStethoscope,
|
||||
|
||||
// ===== Pemerintahan =====
|
||||
bangunan: IconBuilding,
|
||||
darurat: IconAlertTriangle
|
||||
kantorDesa: IconBuildingCommunity,
|
||||
administrasi: IconFileText,
|
||||
informasi: IconInfoCircle,
|
||||
pengaduan: IconMessageReport,
|
||||
layananPublik: IconUsers,
|
||||
}
|
||||
|
||||
/* =======================
|
||||
Icon Mapper Component
|
||||
======================= */
|
||||
type Props = {
|
||||
name: IconKey
|
||||
size?: number
|
||||
color?: string
|
||||
}
|
||||
|
||||
export const IconMapper: React.FC<Props> = ({ name, size = 24, color }) => {
|
||||
const IconComponent = iconMap[name]
|
||||
if (!IconComponent) return null
|
||||
export const IconMapper: React.FC<Props> = ({
|
||||
name,
|
||||
size = 24,
|
||||
color,
|
||||
}) => {
|
||||
const IconComponent = iconMap[name] ?? IconQuestionMark
|
||||
return <IconComponent size={size} color={color} />
|
||||
}
|
||||
|
||||
@@ -6,27 +6,38 @@ import {
|
||||
IconAlertTriangle,
|
||||
IconAmbulance,
|
||||
IconBuilding,
|
||||
IconBuildingCommunity,
|
||||
IconCash,
|
||||
IconChartLine,
|
||||
IconChristmasTreeFilled,
|
||||
IconClipboardTextFilled,
|
||||
IconDroplet,
|
||||
IconFileText,
|
||||
IconFiretruck,
|
||||
IconFirstAidKit,
|
||||
IconHome,
|
||||
IconHomeEco,
|
||||
IconHospital,
|
||||
IconInfoCircle,
|
||||
IconLeaf,
|
||||
IconLifebuoy,
|
||||
IconMessageReport,
|
||||
IconPhoneCall,
|
||||
IconRecycle,
|
||||
IconRun,
|
||||
IconScale,
|
||||
IconSchool,
|
||||
IconShield,
|
||||
IconShieldFilled,
|
||||
IconShoppingCart,
|
||||
IconStethoscope,
|
||||
IconTent,
|
||||
IconTrashFilled,
|
||||
IconTree,
|
||||
IconTrendingUp,
|
||||
IconTrophy,
|
||||
IconTruckFilled,
|
||||
IconUsers,
|
||||
} from '@tabler/icons-react';
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
@@ -51,15 +62,32 @@ const iconMap = {
|
||||
pelatihan: { label: 'Pelatihan', icon: IconSchool },
|
||||
subsidi: { label: 'Subsidi', icon: IconShoppingCart },
|
||||
layananKesehatan: { label: 'Layanan Kesehatan', icon: IconHospital },
|
||||
|
||||
// ===== Keamanan & Darurat =====
|
||||
polisi: { label: 'Polisi', icon: IconShieldFilled },
|
||||
ambulans: { label: 'Ambulans', icon: IconAmbulance },
|
||||
pemadam: { label: 'Pemadam', icon: IconFiretruck },
|
||||
rumahSakit: { label: 'Rumah Sakit', icon: IconHospital },
|
||||
bangunan: { label: 'Bangunan', icon: IconBuilding },
|
||||
pemadam: { label: 'Pemadam Kebakaran', icon: IconFiretruck },
|
||||
darurat: { label: 'Darurat', icon: IconAlertTriangle },
|
||||
sar: { label: 'SAR / Basarnas', icon: IconLifebuoy },
|
||||
evakuasi: { label: 'Evakuasi', icon: IconRun },
|
||||
keamanan: { label: 'Keamanan', icon: IconShield },
|
||||
teleponDarurat: { label: 'Telepon Darurat', icon: IconPhoneCall },
|
||||
|
||||
// ===== Kesehatan =====
|
||||
rumahSakit: { label: 'Rumah Sakit', icon: IconHospital },
|
||||
puskesmas: { label: 'Puskesmas', icon: IconFirstAidKit },
|
||||
klinik: { label: 'Klinik', icon: IconStethoscope },
|
||||
|
||||
// ===== Pemerintahan & Fasilitas =====
|
||||
bangunan: { label: 'Bangunan', icon: IconBuilding },
|
||||
kantorDesa: { label: 'Kantor Desa', icon: IconBuildingCommunity },
|
||||
administrasi: { label: 'Administrasi', icon: IconFileText },
|
||||
informasi: { label: 'Informasi', icon: IconInfoCircle },
|
||||
pengaduan: { label: 'Pengaduan', icon: IconMessageReport },
|
||||
layananPublik: { label: 'Layanan Publik', icon: IconUsers },
|
||||
};
|
||||
|
||||
|
||||
type IconKey = keyof typeof iconMap;
|
||||
|
||||
const iconList = Object.entries(iconMap).map(([value, data]) => ({
|
||||
|
||||
@@ -26,6 +26,17 @@ import {
|
||||
IconTruckFilled,
|
||||
IconBuilding,
|
||||
IconAlertTriangle,
|
||||
IconBuildingCommunity,
|
||||
IconFileText,
|
||||
IconFirstAidKit,
|
||||
IconInfoCircle,
|
||||
IconLifebuoy,
|
||||
IconMessageReport,
|
||||
IconPhoneCall,
|
||||
IconRun,
|
||||
IconShield,
|
||||
IconStethoscope,
|
||||
IconUsers,
|
||||
} from '@tabler/icons-react';
|
||||
|
||||
const iconMap = {
|
||||
@@ -49,12 +60,29 @@ const iconMap = {
|
||||
pelatihan: { label: 'Pelatihan', icon: IconSchool },
|
||||
subsidi: { label: 'Subsidi', icon: IconShoppingCart },
|
||||
layananKesehatan: { label: 'Layanan Kesehatan', icon: IconHospital },
|
||||
|
||||
// ===== Keamanan & Darurat =====
|
||||
polisi: { label: 'Polisi', icon: IconShieldFilled },
|
||||
ambulans: { label: 'Ambulans', icon: IconAmbulance },
|
||||
pemadam: { label: 'Pemadam', icon: IconFiretruck },
|
||||
rumahSakit: { label: 'Rumah Sakit', icon: IconHospital },
|
||||
bangunan: { label: 'Bangunan', icon: IconBuilding },
|
||||
pemadam: { label: 'Pemadam Kebakaran', icon: IconFiretruck },
|
||||
darurat: { label: 'Darurat', icon: IconAlertTriangle },
|
||||
sar: { label: 'SAR / Basarnas', icon: IconLifebuoy },
|
||||
evakuasi: { label: 'Evakuasi', icon: IconRun },
|
||||
keamanan: { label: 'Keamanan', icon: IconShield },
|
||||
teleponDarurat: { label: 'Telepon Darurat', icon: IconPhoneCall },
|
||||
|
||||
// ===== Kesehatan =====
|
||||
rumahSakit: { label: 'Rumah Sakit', icon: IconHospital },
|
||||
puskesmas: { label: 'Puskesmas', icon: IconFirstAidKit },
|
||||
klinik: { label: 'Klinik', icon: IconStethoscope },
|
||||
|
||||
// ===== Pemerintahan & Fasilitas =====
|
||||
bangunan: { label: 'Bangunan', icon: IconBuilding },
|
||||
kantorDesa: { label: 'Kantor Desa', icon: IconBuildingCommunity },
|
||||
administrasi: { label: 'Administrasi', icon: IconFileText },
|
||||
informasi: { label: 'Informasi', icon: IconInfoCircle },
|
||||
pengaduan: { label: 'Pengaduan', icon: IconMessageReport },
|
||||
layananPublik: { label: 'Layanan Publik', icon: IconUsers },
|
||||
};
|
||||
|
||||
export type IconKey = keyof typeof iconMap;
|
||||
|
||||
Reference in New Issue
Block a user