feat: update APBDes data with real values and fix SDGS layout
- Update APBDes data with actual values (390M, 470M, 290M) - Fix SDGS Desa layout to display horizontally with auto-wrap - Add responsive grid for SDGS cards (1 col mobile, 2 tablet, 3 desktop) - Add GitHub OAuth redirectURI configuration Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
BIN
public/SDGS-1.png
Normal file
BIN
public/SDGS-1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 54 KiB |
BIN
public/SDGS-16.png
Normal file
BIN
public/SDGS-16.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 58 KiB |
BIN
public/SDGS-3.png
Normal file
BIN
public/SDGS-3.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 64 KiB |
BIN
public/SDGS-7.png
Normal file
BIN
public/SDGS-7.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 69 KiB |
@@ -1,4 +1,5 @@
|
|||||||
import {
|
import {
|
||||||
|
Briefcase,
|
||||||
Calendar,
|
Calendar,
|
||||||
CheckCircle,
|
CheckCircle,
|
||||||
FileText,
|
FileText,
|
||||||
@@ -27,7 +28,9 @@ import {
|
|||||||
Card, // Added for icon containers
|
Card, // Added for icon containers
|
||||||
Grid,
|
Grid,
|
||||||
Group,
|
Group,
|
||||||
|
Image,
|
||||||
Progress,
|
Progress,
|
||||||
|
SimpleGrid,
|
||||||
Stack,
|
Stack,
|
||||||
Text,
|
Text,
|
||||||
ThemeIcon,
|
ThemeIcon,
|
||||||
@@ -67,9 +70,16 @@ const eventData = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
const apbdesData = [
|
const apbdesData = [
|
||||||
{ name: "Belanja", value: 70, color: "blue" },
|
{ name: "Belanja", value: 390, label: "390M" },
|
||||||
{ name: "Pendapatan", value: 90, color: "green" },
|
{ name: "Pendapatan", value: 470, label: "470M" },
|
||||||
{ name: "Pembangunan", value: 50, color: "orange" },
|
{ name: "Pembiayaan", value: 290, label: "290M" },
|
||||||
|
];
|
||||||
|
|
||||||
|
const sdgsData = [
|
||||||
|
{ label: "Desa Berenergi Bersih Dan Terbarukan", value: 99.64, image: "/SDGS-7.png" },
|
||||||
|
{ label: "Desa Damai Berkeadilan", value: 78.65, image: "/SDGS-16.png" },
|
||||||
|
{ label: "Desa Sehat Dan Sejahtera", value: 77.37, image: "/SDGS-3.png" },
|
||||||
|
{ label: "Desa Tanpa Kemiskinan", value: 52.62, image: "/SDGS-1.png" }
|
||||||
];
|
];
|
||||||
|
|
||||||
export function DashboardContent() {
|
export function DashboardContent() {
|
||||||
@@ -109,7 +119,7 @@ export function DashboardContent() {
|
|||||||
variant="filled"
|
variant="filled"
|
||||||
size="xl"
|
size="xl"
|
||||||
radius="xl"
|
radius="xl"
|
||||||
color={dark ? "gray" : "darmasaba-blue"}
|
color={dark ? "gray" : "darmasaba-navy"}
|
||||||
>
|
>
|
||||||
<FileText style={{ width: "70%", height: "70%" }} />
|
<FileText style={{ width: "70%", height: "70%" }} />
|
||||||
</ThemeIcon>
|
</ThemeIcon>
|
||||||
@@ -143,7 +153,7 @@ export function DashboardContent() {
|
|||||||
variant="filled"
|
variant="filled"
|
||||||
size="xl"
|
size="xl"
|
||||||
radius="xl"
|
radius="xl"
|
||||||
color={dark ? "gray" : "darmasaba-blue"}
|
color={dark ? "gray" : "darmasaba-navy"}
|
||||||
>
|
>
|
||||||
<MessageCircle style={{ width: "70%", height: "70%" }} />
|
<MessageCircle style={{ width: "70%", height: "70%" }} />
|
||||||
</ThemeIcon>
|
</ThemeIcon>
|
||||||
@@ -180,7 +190,7 @@ export function DashboardContent() {
|
|||||||
variant="filled"
|
variant="filled"
|
||||||
size="xl"
|
size="xl"
|
||||||
radius="xl"
|
radius="xl"
|
||||||
color={dark ? "gray" : "darmasaba-blue"}
|
color={dark ? "gray" : "darmasaba-navy"}
|
||||||
>
|
>
|
||||||
<CheckCircle style={{ width: "70%", height: "70%" }} />
|
<CheckCircle style={{ width: "70%", height: "70%" }} />
|
||||||
</ThemeIcon>
|
</ThemeIcon>
|
||||||
@@ -214,7 +224,7 @@ export function DashboardContent() {
|
|||||||
variant="filled"
|
variant="filled"
|
||||||
size="xl"
|
size="xl"
|
||||||
radius="xl"
|
radius="xl"
|
||||||
color={dark ? "gray" : "darmasaba-blue"}
|
color={dark ? "gray" : "darmasaba-navy"}
|
||||||
>
|
>
|
||||||
<Users style={{ width: "70%", height: "70%" }} />
|
<Users style={{ width: "70%", height: "70%" }} />
|
||||||
</ThemeIcon>
|
</ThemeIcon>
|
||||||
@@ -282,7 +292,7 @@ export function DashboardContent() {
|
|||||||
<Tooltip />
|
<Tooltip />
|
||||||
<Bar
|
<Bar
|
||||||
dataKey="value"
|
dataKey="value"
|
||||||
fill="var(--mantine-color-blue-filled)"
|
fill="#1E3A5F"
|
||||||
radius={[4, 4, 0, 0]}
|
radius={[4, 4, 0, 0]}
|
||||||
/>
|
/>
|
||||||
</BarChart>
|
</BarChart>
|
||||||
@@ -375,46 +385,7 @@ export function DashboardContent() {
|
|||||||
<Group gap="xs" mb="lg">
|
<Group gap="xs" mb="lg">
|
||||||
<Box>
|
<Box>
|
||||||
{/* Original SVG icon */}
|
{/* Original SVG icon */}
|
||||||
<svg
|
<Briefcase color="#1E3A5F" />
|
||||||
width="24"
|
|
||||||
height="24"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="none"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
>
|
|
||||||
<rect
|
|
||||||
x="3"
|
|
||||||
y="3"
|
|
||||||
width="7"
|
|
||||||
height="7"
|
|
||||||
rx="1"
|
|
||||||
fill="currentColor"
|
|
||||||
/>
|
|
||||||
<rect
|
|
||||||
x="3"
|
|
||||||
y="14"
|
|
||||||
width="7"
|
|
||||||
height="7"
|
|
||||||
rx="1"
|
|
||||||
fill="currentColor"
|
|
||||||
/>
|
|
||||||
<rect
|
|
||||||
x="14"
|
|
||||||
y="3"
|
|
||||||
width="7"
|
|
||||||
height="7"
|
|
||||||
rx="1"
|
|
||||||
fill="currentColor"
|
|
||||||
/>
|
|
||||||
<rect
|
|
||||||
x="14"
|
|
||||||
y="14"
|
|
||||||
width="7"
|
|
||||||
height="7"
|
|
||||||
rx="1"
|
|
||||||
fill="currentColor"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</Box>
|
</Box>
|
||||||
<Title order={4}>Divisi Teraktif</Title>
|
<Title order={4}>Divisi Teraktif</Title>
|
||||||
</Group>
|
</Group>
|
||||||
@@ -433,7 +404,7 @@ export function DashboardContent() {
|
|||||||
value={(divisi.value / 37) * 100}
|
value={(divisi.value / 37) * 100}
|
||||||
size="sm"
|
size="sm"
|
||||||
radius="xl"
|
radius="xl"
|
||||||
color="blue"
|
color="#1E3A5F"
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
))}
|
))}
|
||||||
@@ -459,7 +430,7 @@ export function DashboardContent() {
|
|||||||
<Box
|
<Box
|
||||||
key={index}
|
key={index}
|
||||||
style={{
|
style={{
|
||||||
borderLeft: "4px solid var(--mantine-color-blue-filled)",
|
borderLeft: "4px solid #1E3A5F",
|
||||||
paddingLeft: 12,
|
paddingLeft: 12,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -493,18 +464,53 @@ export function DashboardContent() {
|
|||||||
{data.name}
|
{data.name}
|
||||||
</Text>
|
</Text>
|
||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
<Grid.Col span={9}>
|
<Grid.Col span={7}>
|
||||||
<Progress
|
<Progress
|
||||||
value={data.value}
|
value={(data.value / 470) * 100}
|
||||||
size="lg"
|
size="lg"
|
||||||
radius="xl"
|
radius="xl"
|
||||||
color={data.color}
|
color="#1E3A5F"
|
||||||
/>
|
/>
|
||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
|
<Grid.Col span={2}>
|
||||||
|
<Text size="sm" fw={600} ta="right">
|
||||||
|
{data.label}
|
||||||
|
</Text>
|
||||||
|
</Grid.Col>
|
||||||
</Grid>
|
</Grid>
|
||||||
))}
|
))}
|
||||||
</Stack>
|
</Stack>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
|
{/* SDGS Desa */}
|
||||||
|
<Card
|
||||||
|
p="md"
|
||||||
|
style={{ borderColor: dark ? "#141D34" : "white" }}
|
||||||
|
radius="md"
|
||||||
|
withBorder
|
||||||
|
bg={dark ? "#141D34" : "white"}
|
||||||
|
>
|
||||||
|
<Title order={4} mb="lg">
|
||||||
|
SDGS Desa
|
||||||
|
</Title>
|
||||||
|
<SimpleGrid cols={{ base: 2, md: 5 }}>
|
||||||
|
{sdgsData.map((data, index) => (
|
||||||
|
<Card key={index} withBorder bg={dark ? "#141D34" : "white"} p="md">
|
||||||
|
<Group gap="sm" align="center">
|
||||||
|
<Image src={data.image} width={40} height={40} />
|
||||||
|
<Box>
|
||||||
|
<Text size="sm" ta={"center"} fw={500} lineClamp={2}>
|
||||||
|
{data.label}
|
||||||
|
</Text>
|
||||||
|
<Text size="sm" ta={"center"} fw={600} c="darmasaba-blue">
|
||||||
|
{data.value}
|
||||||
|
</Text>
|
||||||
|
</Box>
|
||||||
|
</Group>
|
||||||
|
</Card>
|
||||||
|
))}
|
||||||
|
</SimpleGrid>
|
||||||
|
</Card>
|
||||||
</Stack>
|
</Stack>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,6 +61,8 @@ export function Sidebar({ className }: SidebarProps) {
|
|||||||
(item) => location.pathname === item.path,
|
(item) => location.pathname === item.path,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const headerBgColor = colorScheme === "dark" ? "#ebedf0ff" : "#19355E";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box className={className}>
|
<Box className={className}>
|
||||||
{/* Logo */}
|
{/* Logo */}
|
||||||
@@ -92,7 +94,7 @@ export function Sidebar({ className }: SidebarProps) {
|
|||||||
label={item.name}
|
label={item.name}
|
||||||
active={isActive}
|
active={isActive}
|
||||||
variant="subtle"
|
variant="subtle"
|
||||||
color="blue"
|
color={headerBgColor}
|
||||||
style={{
|
style={{
|
||||||
background: isActive ? isActiveBg : "transparent",
|
background: isActive ? isActiveBg : "transparent",
|
||||||
fontWeight: isActive ? "bold" : "normal",
|
fontWeight: isActive ? "bold" : "normal",
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ export const auth = betterAuth({
|
|||||||
clientId: process.env.GITHUB_CLIENT_ID || "CLIENT_ID_MISSING",
|
clientId: process.env.GITHUB_CLIENT_ID || "CLIENT_ID_MISSING",
|
||||||
clientSecret: process.env.GITHUB_CLIENT_SECRET || "CLIENT_SECRET_MISSING",
|
clientSecret: process.env.GITHUB_CLIENT_SECRET || "CLIENT_SECRET_MISSING",
|
||||||
enabled: true,
|
enabled: true,
|
||||||
|
redirectURI: `${baseUrl}/api/auth/callback/github`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
user: {
|
user: {
|
||||||
|
|||||||
Reference in New Issue
Block a user