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

@@ -3,7 +3,7 @@ import dataLingkunganDesaState from '@/app/admin/(dashboard)/_state/lingkungan/d
import colors from '@/con/colors';
import { Badge, Box, Center, Group, Pagination, Paper, SimpleGrid, Skeleton, Stack, Text, TextInput, Tooltip } from '@mantine/core';
import { useDebouncedValue, useShallowEffect } from '@mantine/hooks';
import { Icon, IconChartLine, IconChristmasTreeFilled, IconClipboardTextFilled, IconDroplet, IconHome, IconHomeEco, IconLeaf, IconRecycle, IconScale, IconSearch, IconShieldFilled, IconTent, IconTrashFilled, IconTree, IconTrendingUp, IconTrophy, IconTruckFilled } from '@tabler/icons-react';
import { Icon, IconAlertTriangle, IconAmbulance, IconBook, IconBuilding, IconBuildingCommunity, IconCash, IconChartLine, IconChristmasTreeFilled, IconClipboard, IconDroplet, IconFileText, IconFiretruck, IconFirstAidKit, IconHome, IconHomeEco, IconHospital, IconInfoCircle, IconLeaf, IconLifebuoy, IconMessageReport, IconPhoneCall, IconRecycle, IconRun, IconScale, IconSchool, IconSearch, IconShield, IconShieldFilled, IconShoppingCart, IconStethoscope, IconTent, IconTrash, IconTree, IconTrendingUp, IconTrophy, IconTruck, IconUsers } from '@tabler/icons-react';
import React, { useState } from 'react';
import { useProxy } from 'valtio/utils';
import BackButton from '../../desa/layanan/_com/BackButto';
@@ -21,24 +21,51 @@ function Page() {
} = state
const iconMap: Record<string, Icon> = {
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
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,
};
// ===== 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(() => {
load(page, 6, debouncedSearch)

View File

@@ -3,11 +3,11 @@ import pengelolaanSampahState from '@/app/admin/(dashboard)/_state/lingkungan/pe
import colors from '@/con/colors';
import { Box, Center, Flex, Group, Pagination, Paper, SimpleGrid, Skeleton, Stack, Text, TextInput } from '@mantine/core';
import { useDebouncedValue, useShallowEffect } from '@mantine/hooks';
import { Icon, IconChartLine, IconClipboardTextFilled, IconLeaf, IconRecycle, IconRoute, IconScale, IconSearch, IconTent, IconTrashFilled, IconTrophy, IconTruckFilled } from '@tabler/icons-react';
import { Icon, IconAlertTriangle, IconAmbulance, IconBook, IconBuilding, IconBuildingCommunity, IconCash, IconChartLine, IconChristmasTreeFilled, IconClipboard, IconDroplet, IconFileText, IconFiretruck, IconFirstAidKit, IconHome, IconHomeEco, IconHospital, IconInfoCircle, IconLeaf, IconLifebuoy, IconMessageReport, IconPhoneCall, IconRecycle, IconRoute, IconRun, IconScale, IconSchool, IconSearch, IconShield, IconShieldFilled, IconShoppingCart, IconStethoscope, IconTent, IconTrash, IconTree, IconTrendingUp, IconTrophy, IconTruck, IconUsers } from '@tabler/icons-react';
import dynamic from 'next/dynamic';
import React, { useState } from 'react';
import { useProxy } from 'valtio/utils';
import BackButton from '../../desa/layanan/_com/BackButto';
import dynamic from 'next/dynamic';
// Dynamically import the map component to avoid SSR issues with Leaflet
const LeafletMultiMarkerMap = dynamic(
@@ -42,16 +42,51 @@ function Page() {
}, [page, debouncedSearch])
const iconMap: Record<string, Icon> = {
ekowisata: IconLeaf,
kompetisi: IconTrophy,
wisata: IconTent,
ekonomi: IconChartLine,
sampah: IconRecycle,
truck: IconTruckFilled,
scale: IconScale,
clipboard: IconClipboardTextFilled,
trash: IconTrashFilled,
};
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,
// ===== 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
};
if (state.findMany.loading || !data) {
return (

View File

@@ -4,10 +4,21 @@ import programPenghijauanState from '@/app/admin/(dashboard)/_state/lingkungan/p
import { Box, Button, Paper, Skeleton, Stack, Text, ThemeIcon } from '@mantine/core';
import { useShallowEffect } from '@mantine/hooks';
import {
IconArrowLeft, IconChartLine, IconChristmasTreeFilled, IconClipboard,
IconHomeEco, IconLeaf, IconRecycle, IconScale,
IconShieldFilled, IconTent, IconTrash,
IconTrendingUp, IconTrophy, IconTruck
IconAlertTriangle,
IconAmbulance,
IconArrowLeft, IconBook, IconBuilding, IconBuildingCommunity, IconCash, IconChartLine, IconChristmasTreeFilled, IconClipboard,
IconDroplet,
IconFileText,
IconFiretruck,
IconFirstAidKit,
IconHome,
IconHomeEco, IconHospital, IconInfoCircle, IconLeaf, IconLifebuoy, IconMessageReport, IconPhoneCall, IconRecycle, IconRun, IconScale,
IconSchool,
IconShield,
IconShieldFilled, IconShoppingCart, IconStethoscope, IconTent, IconTrash,
IconTree,
IconTrendingUp, IconTrophy, IconTruck,
IconUsers
} from '@tabler/icons-react';
import { useParams, useRouter } from 'next/navigation';
import React from 'react';
@@ -32,6 +43,37 @@ function Page() {
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(() => {

View File

@@ -4,11 +4,11 @@ import programPenghijauanState from '@/app/admin/(dashboard)/_state/lingkungan/p
import colors from '@/con/colors';
import { Box, Center, Group, Pagination, Paper, SimpleGrid, Skeleton, Stack, Text, TextInput, Title, Tooltip } from '@mantine/core';
import { useDebouncedValue, useShallowEffect } from '@mantine/hooks';
import { IconChartLine, IconChristmasTreeFilled, IconClipboardTextFilled, IconHomeEco, IconLeaf, IconRecycle, IconScale, IconSearch, IconShieldFilled, IconTent, IconTrashFilled, IconTrendingUp, IconTrophy, IconTruckFilled } from '@tabler/icons-react';
import { IconAlertTriangle, IconAmbulance, IconBook, IconBuilding, IconBuildingCommunity, IconCash, IconChartLine, IconChristmasTreeFilled, IconClipboard, IconDroplet, IconFileText, IconFiretruck, IconFirstAidKit, IconHome, IconHomeEco, IconHospital, IconInfoCircle, IconLeaf, IconLifebuoy, IconMessageReport, IconPhoneCall, IconRecycle, IconRun, IconScale, IconSchool, IconSearch, IconShield, IconShieldFilled, IconShoppingCart, IconStethoscope, IconTent, IconTrash, IconTree, IconTrendingUp, IconTrophy, IconTruck, IconUsers } from '@tabler/icons-react';
import { useTransitionRouter } from 'next-view-transitions';
import React, { useState } from 'react';
import { useProxy } from 'valtio/utils';
import BackButton from '../../desa/layanan/_com/BackButto';
import { useTransitionRouter } from 'next-view-transitions';
function Page() {
const state = useProxy(programPenghijauanState);
@@ -22,20 +22,51 @@ function Page() {
}, [page, debouncedSearch]);
const iconMap: Record<string, 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,
};
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,
// ===== 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
};
if (loading || !data) {
return (