Fix UI & API Admin Menu Kesehatan, Submenu Data Kesehatan Warga Bagian ChartBar

This commit is contained in:
2025-08-14 20:47:07 +08:00
parent 5e137ba658
commit d7a592c635
34 changed files with 2285 additions and 445 deletions

View File

@@ -1,5 +1,5 @@
import profileLandingPageState from "@/app/admin/(dashboard)/_state/landing-page/profile";
import { Center, Image, Paper, SimpleGrid } from "@mantine/core";
import { Center, Image, Paper, SimpleGrid, Text } from "@mantine/core";
import { useShallowEffect } from "@mantine/hooks";
import { motion } from 'framer-motion';
import { useTransitionRouter } from 'next-view-transitions';
@@ -25,15 +25,21 @@ function ModuleItem({ data }: { data: ProgramInovasiItem }) {
<motion.div
whileHover={{ scale: 1.05 }}
>
<Image src={data.image?.link || ""} alt="icon"
fit="contain"
sizes="100%"
loading="lazy"
{data.image?.link ? (
<Image src={data.image.link} alt="icon"
fit="contain"
sizes="100%"
loading="lazy"
style={{
objectFit: "contain",
objectPosition: "center"
}}
/>
) : (
<Text>
-
</Text>
)}
</motion.div>
</Center>
</Paper>

View File

@@ -23,13 +23,17 @@ function ProfileView({ data }: ProfileViewProps) {
}}
px="xl"
>
{data.image?.link && (
{data.image?.link ? (
<Image
src={data.image.link}
alt={data.name || "Profile image"}
sizes="100%"
fit="contain"
/>
): (
<Text>
-
</Text>
)}
<Box
pos="absolute"

View File

@@ -1,4 +1,4 @@
import { ActionIcon, Flex, Image } from "@mantine/core";
import { ActionIcon, Flex, Image, Text } from "@mantine/core";
import { Prisma } from "@prisma/client";
import { useTransitionRouter } from "next-view-transitions";
@@ -20,7 +20,13 @@ function SosmedView({data} : {data : Prisma.MediaSosialGetPayload<{ include: { i
router.push(item.iconUrl || "");
}}
>
<Image src={item.image?.link || ""} alt="icon" loading="lazy" />
{item.image?.link ? (
<Image src={item.image.link} alt="icon" loading="lazy" />
) : (
<Text>
none
</Text>
)}
</ActionIcon>
);
})}