Seed data menu ekonomi - lingkungan

fix iconmap
This commit is contained in:
2026-01-21 12:07:52 +08:00
parent 17b20e0d40
commit 78c55a8a71
60 changed files with 1854 additions and 316 deletions

View File

@@ -4,24 +4,45 @@ import colors from '@/con/colors';
import { Box, Button, Group, Paper, Skeleton, Stack, Text } from '@mantine/core';
import { useShallowEffect } from '@mantine/hooks';
import {
IconAlertTriangle,
IconAmbulance,
IconArrowBack,
IconBook,
IconBuilding,
IconBuildingCommunity,
IconCash,
IconChartLine,
IconChristmasTreeFilled,
IconClipboard,
IconClipboardTextFilled,
IconDroplet,
IconEdit,
IconFileText,
IconFiretruck,
IconFirstAidKit,
IconHome,
IconHomeEco,
IconHospital,
IconInfoCircle,
IconLeaf,
IconLifebuoy,
IconMessageReport,
IconPhoneCall,
IconRecycle,
IconRun,
IconScale,
IconSchool,
IconShield,
IconShieldFilled,
IconShoppingCart,
IconStethoscope,
IconTent,
IconTrash,
IconTrashFilled,
IconTree,
IconTrendingUp,
IconTrophy,
IconTruck,
IconTruckFilled,
IconUsers
} from '@tabler/icons-react';
import { useParams, useRouter } from 'next/navigation';
import React, { useState } from 'react';
@@ -36,24 +57,53 @@ function DetailDataLingkunganDesa() {
const params = useParams();
const [selectedId, setSelectedId] = useState<string | null>(null);
const iconMap: Record<string, React.FC<any>> = {
ekowisata: IconLeaf,
kompetisi: IconTrophy,
wisata: IconTent,
ekonomi: IconChartLine,
sampah: IconRecycle,
truck: IconTruck,
scale: IconScale,
clipboard: IconClipboard,
trash: IconTrash,
lingkunganSehat: IconHomeEco,
sumberOksigen: IconChristmasTreeFilled,
ekonomiBerkelanjutan: IconTrendingUp,
mencegahBencana: IconShieldFilled,
rumah: IconHome,
pohon: IconTree,
air: IconDroplet,
};
const iconMap: Record<string, React.FC<any>> = {
// ===== Umum & Lingkungan =====
ekowisata: IconLeaf,
kompetisi: IconTrophy,
wisata: IconTent,
ekonomi: IconChartLine,
sampah: IconRecycle,
truck: IconTruckFilled,
scale: IconScale,
clipboard: IconClipboardTextFilled,
trash: IconTrashFilled,
lingkunganSehat: IconHomeEco,
sumberOksigen: IconChristmasTreeFilled,
ekonomiBerkelanjutan: IconTrendingUp,
mencegahBencana: IconShieldFilled,
rumah: IconHome,
pohon: IconTree,
air: IconDroplet,
bantuan: IconCash,
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 & Fasilitas =====
bangunan: IconBuilding,
kantorDesa: IconBuildingCommunity,
administrasi: IconFileText,
informasi: IconInfoCircle,
pengaduan: IconMessageReport,
layananPublik: IconUsers,
book: IconBook
};
useShallowEffect(() => {
stateDataLingkungan.findUnique.load(params?.id as string);

View File

@@ -23,31 +23,43 @@ import {
import {
IconAlertTriangle,
IconAmbulance,
IconBook,
IconBuilding,
IconBuildingCommunity,
IconCash,
IconChartLine,
IconChristmasTreeFilled,
IconClipboardTextFilled,
IconDeviceImacCog,
IconDroplet,
IconFileText,
IconFiretruck,
IconFirstAidKit,
IconHome,
IconHomeEco,
IconHospital,
IconInfoCircle,
IconLeaf,
IconLifebuoy,
IconMessageReport,
IconPhoneCall,
IconPlus,
IconRecycle,
IconRun,
IconScale,
IconSchool,
IconSearch,
IconShield,
IconShieldFilled,
IconShoppingCart,
IconStethoscope,
IconTent,
IconTrashFilled,
IconTree,
IconTrendingUp,
IconTrophy,
IconTruckFilled,
IconUsers,
} from '@tabler/icons-react';
import { useRouter } from 'next/navigation';
import React, { useEffect, useState } from 'react';
@@ -84,34 +96,53 @@ function ListDataLingkunganDesa({ search }: { search: string }) {
const filteredData = data || [];
const iconMap: Record<string, React.FC<any>> = {
ekowisata: IconLeaf,
kompetisi: IconTrophy,
wisata: IconTent,
ekonomi: IconChartLine,
sampah: IconRecycle,
truck: IconTruckFilled,
scale: IconScale,
clipboard: IconClipboardTextFilled,
trash: IconTrashFilled,
lingkunganSehat: IconHomeEco,
sumberOksigen: IconChristmasTreeFilled,
ekonomiBerkelanjutan: IconTrendingUp,
mencegahBencana: IconShieldFilled,
rumah: IconHome,
pohon: IconTree,
air: IconDroplet,
bantuan: IconCash,
pelatihan: IconSchool,
subsidi: IconShoppingCart,
layananKesehatan: IconHospital,
polisi: IconShieldFilled,
ambulans: IconAmbulance,
pemadam: IconFiretruck,
rumahSakit: IconHospital,
bangunan: IconBuilding,
darurat: IconAlertTriangle
};
const iconMap: Record<string, React.FC<any>> = {
// ===== Umum & Lingkungan =====
ekowisata: IconLeaf,
kompetisi: IconTrophy,
wisata: IconTent,
ekonomi: IconChartLine,
sampah: IconRecycle,
truck: IconTruckFilled,
scale: IconScale,
clipboard: IconClipboardTextFilled,
trash: IconTrashFilled,
lingkunganSehat: IconHomeEco,
sumberOksigen: IconChristmasTreeFilled,
ekonomiBerkelanjutan: IconTrendingUp,
mencegahBencana: IconShieldFilled,
rumah: IconHome,
pohon: IconTree,
air: IconDroplet,
bantuan: IconCash,
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 & Fasilitas =====
bangunan: IconBuilding,
kantorDesa: IconBuildingCommunity,
administrasi: IconFileText,
informasi: IconInfoCircle,
pengaduan: IconMessageReport,
layananPublik: IconUsers,
book: IconBook
};
if (loading || !data) {
return (

View File

@@ -2,7 +2,7 @@
import colors from '@/con/colors';
import { Box, Button, Center, Group, Pagination, Paper, Skeleton, Stack, Table, TableTbody, TableTd, TableTh, TableThead, TableTr, Text, Title } from '@mantine/core';
import { useDebouncedValue, useShallowEffect } from '@mantine/hooks';
import { IconAlertTriangle, IconAmbulance, IconBuilding, IconCash, IconChartLine, IconChristmasTreeFilled, IconClipboardTextFilled, IconDroplet, IconEdit, IconFiretruck, IconHome, IconHomeEco, IconHospital, IconLeaf, IconPlus, IconRecycle, IconScale, IconSchool, IconSearch, IconShieldFilled, IconShoppingCart, IconTent, IconTrashFilled, IconTree, IconTrendingUp, IconTrophy, IconTruckFilled } from '@tabler/icons-react';
import { IconAlertTriangle, IconAmbulance, IconBook, IconBuilding, IconBuildingCommunity, IconCash, IconChartLine, IconChristmasTreeFilled, IconClipboardTextFilled, IconDroplet, IconEdit, IconFileText, IconFiretruck, IconFirstAidKit, IconHome, IconHomeEco, IconHospital, IconInfoCircle, IconLeaf, IconLifebuoy, IconMessageReport, IconPhoneCall, IconPlus, IconRecycle, IconRun, IconScale, IconSchool, IconSearch, IconShield, IconShieldFilled, IconShoppingCart, IconStethoscope, IconTent, IconTrashFilled, IconTree, IconTrendingUp, IconTrophy, IconTruckFilled, IconUsers } from '@tabler/icons-react';
import { useRouter } from 'next/navigation';
import React, { useState } from 'react';
import { useProxy } from 'valtio/utils';
@@ -58,32 +58,51 @@ function ListPengelolaanSampahBankSampah({ search }: { search: string }) {
const filteredData = data || []
const iconMap: Record<string, React.FC<{ size: number; style?: React.CSSProperties }>> = {
ekowisata: IconLeaf,
kompetisi: IconTrophy,
wisata: IconTent,
ekonomi: IconChartLine,
sampah: IconRecycle,
truck: IconTruckFilled,
scale: IconScale,
clipboard: IconClipboardTextFilled,
trash: IconTrashFilled,
lingkunganSehat: IconHomeEco,
sumberOksigen: IconChristmasTreeFilled,
ekonomiBerkelanjutan: IconTrendingUp,
mencegahBencana: IconShieldFilled,
rumah: IconHome,
pohon: IconTree,
air: IconDroplet,
bantuan: IconCash,
pelatihan: IconSchool,
subsidi: IconShoppingCart,
layananKesehatan: IconHospital,
polisi: IconShieldFilled,
ambulans: IconAmbulance,
pemadam: IconFiretruck,
rumahSakit: IconHospital,
bangunan: IconBuilding,
darurat: IconAlertTriangle,
// ===== Umum & Lingkungan =====
ekowisata: IconLeaf,
kompetisi: IconTrophy,
wisata: IconTent,
ekonomi: IconChartLine,
sampah: IconRecycle,
truck: IconTruckFilled,
scale: IconScale,
clipboard: IconClipboardTextFilled,
trash: IconTrashFilled,
lingkunganSehat: IconHomeEco,
sumberOksigen: IconChristmasTreeFilled,
ekonomiBerkelanjutan: IconTrendingUp,
mencegahBencana: IconShieldFilled,
rumah: IconHome,
pohon: IconTree,
air: IconDroplet,
bantuan: IconCash,
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 & Fasilitas =====
bangunan: IconBuilding,
kantorDesa: IconBuildingCommunity,
administrasi: IconFileText,
informasi: IconInfoCircle,
pengaduan: IconMessageReport,
layananPublik: IconUsers,
book: IconBook
};
if (loading || !data) {

View File

@@ -6,12 +6,14 @@ import { useShallowEffect } from '@mantine/hooks';
import {
IconAlertTriangle,
IconAmbulance,
IconArrowBack, IconBuilding, IconCash, IconChartLine, IconChristmasTreeFilled, IconClipboard,
IconArrowBack, IconBook, IconBuilding, IconBuildingCommunity, IconCash, IconChartLine, IconChristmasTreeFilled, IconClipboard,
IconDroplet,
IconEdit, IconFiretruck, IconHome, IconHomeEco, IconHospital, IconLeaf, IconRecycle, IconScale,
IconEdit, IconFileText, IconFiretruck, IconFirstAidKit, IconHome, IconHomeEco, IconHospital, IconInfoCircle, IconLeaf, IconLifebuoy, IconMessageReport, IconPhoneCall, IconRecycle, IconRun, IconScale,
IconSchool,
IconShieldFilled, IconShoppingCart, IconTent, IconTrash, IconTree, IconTrendingUp,
IconTrophy, IconTruck
IconShield,
IconShieldFilled, IconShoppingCart, IconStethoscope, IconTent, IconTrash, IconTree, IconTrendingUp,
IconTrophy, IconTruck,
IconUsers
} from '@tabler/icons-react';
import { useParams, useRouter } from 'next/navigation';
import React, { useState } from 'react';
@@ -28,31 +30,49 @@ function DetailProgramPenghijauan() {
const iconMap: Record<string, React.FC<any>> = {
ekowisata: IconLeaf,
kompetisi: IconTrophy,
wisata: IconTent,
ekonomi: IconChartLine,
sampah: IconRecycle,
truck: IconTruck,
scale: IconScale,
clipboard: IconClipboard,
trash: IconTrash,
lingkunganSehat: IconHomeEco,
sumberOksigen: IconChristmasTreeFilled,
ekonomiBerkelanjutan: IconTrendingUp,
mencegahBencana: IconShieldFilled,
rumah: IconHome,
pohon: IconTree,
air: IconDroplet,
bantuan: IconCash,
pelatihan: IconSchool,
subsidi: IconShoppingCart,
layananKesehatan: IconHospital,
polisi: IconShieldFilled,
ambulans: IconAmbulance,
pemadam: IconFiretruck,
rumahSakit: IconHospital,
bangunan: IconBuilding,
darurat: IconAlertTriangle
kompetisi: IconTrophy,
wisata: IconTent,
ekonomi: IconChartLine,
sampah: IconRecycle,
truck: IconTruck,
scale: IconScale,
clipboard: IconClipboard,
trash: IconTrash,
lingkunganSehat: IconHomeEco,
sumberOksigen: IconChristmasTreeFilled,
ekonomiBerkelanjutan: IconTrendingUp,
mencegahBencana: IconShieldFilled,
rumah: IconHome,
pohon: IconTree,
air: IconDroplet,
bantuan: IconCash,
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,
kantorDesa: IconBuildingCommunity,
administrasi: IconFileText,
informasi: IconInfoCircle,
pengaduan: IconMessageReport,
layananPublik: IconUsers,
book: IconBook
};
useShallowEffect(() => {
@@ -113,7 +133,7 @@ function DetailProgramPenghijauan() {
<Box>
<Text fz="lg" fw="bold">Ikon Program</Text>
{iconMap[data?.icon] ? (
{iconMap[data?.icon] ? (
<Box title={data?.icon}>
{React.createElement(iconMap[data.icon], { size: 28, color: colors['blue-button'] })}
</Box>

View File

@@ -23,31 +23,43 @@ import {
import {
IconAlertTriangle,
IconAmbulance,
IconBook,
IconBuilding,
IconBuildingCommunity,
IconCash,
IconChartLine,
IconChristmasTreeFilled,
IconClipboardTextFilled,
IconDeviceImac,
IconDroplet,
IconFileText,
IconFiretruck,
IconFirstAidKit,
IconHome,
IconHomeEco,
IconHospital,
IconInfoCircle,
IconLeaf,
IconLifebuoy,
IconMessageReport,
IconPhoneCall,
IconPlus,
IconRecycle,
IconRun,
IconScale,
IconSchool,
IconSearch,
IconShield,
IconShieldFilled,
IconShoppingCart,
IconStethoscope,
IconTent,
IconTrashFilled,
IconTree,
IconTrendingUp,
IconTrophy,
IconTruckFilled,
IconUsers,
} from '@tabler/icons-react';
import { useRouter } from 'next/navigation';
import React, { useEffect, useState } from 'react';
@@ -85,6 +97,7 @@ function ListProgramPenghijauan({ search }: { search: string }) {
const filteredData = data || [];
const iconMap: Record<string, React.FC<any>> = {
// ===== Umum & Lingkungan =====
ekowisata: IconLeaf,
kompetisi: IconTrophy,
wisata: IconTent,
@@ -105,12 +118,30 @@ function ListProgramPenghijauan({ search }: { search: string }) {
pelatihan: IconSchool,
subsidi: IconShoppingCart,
layananKesehatan: IconHospital,
// ===== Keamanan & Darurat =====
polisi: IconShieldFilled,
ambulans: IconAmbulance,
pemadam: IconFiretruck,
rumahSakit: IconHospital,
bangunan: IconBuilding,
darurat: IconAlertTriangle,
sar: IconLifebuoy,
evakuasi: IconRun,
keamanan: IconShield,
teleponDarurat: IconPhoneCall,
// ===== Kesehatan =====
rumahSakit: IconHospital,
puskesmas: IconFirstAidKit,
klinik: IconStethoscope,
// ===== Pemerintahan & Fasilitas =====
bangunan: IconBuilding,
kantorDesa: IconBuildingCommunity,
administrasi: IconFileText,
informasi: IconInfoCircle,
pengaduan: IconMessageReport,
layananPublik: IconUsers,
book: IconBook
};
if (loading || !data) {