feat:
- Tampilan buat berita - Tampilan dialog page buat proyek investasi - Tampilan list edit beritq - # No issue fix: - Perubahan minor
This commit is contained in:
@@ -3,10 +3,12 @@
|
||||
import { RouterAdminInvestasi } from "@/app/lib/router_hipmi/router_admin";
|
||||
import {
|
||||
ActionIcon,
|
||||
Badge,
|
||||
Box,
|
||||
Center,
|
||||
Grid,
|
||||
Paper,
|
||||
ScrollArea,
|
||||
Stack,
|
||||
Table,
|
||||
Text,
|
||||
@@ -40,23 +42,43 @@ const listBox = [
|
||||
const listTable = [
|
||||
{
|
||||
id: 1,
|
||||
status: {
|
||||
id: 1,
|
||||
name: "Publish",
|
||||
},
|
||||
name: "Subway Kuta",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
status: {
|
||||
id: 2,
|
||||
name: "Menunggu Konfirmasi",
|
||||
},
|
||||
name: "Event MCD",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
status: {
|
||||
id: 2,
|
||||
name: " Menunggu Konfirmasi",
|
||||
},
|
||||
name: "Villa Batubulan",
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
status: {
|
||||
id: 1,
|
||||
name: "Publish",
|
||||
},
|
||||
name: "Kost Alif Denpasar",
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: "Pabrik Rokok",
|
||||
status: {
|
||||
id: 1,
|
||||
name: "Publish",
|
||||
},
|
||||
name: "Pabrik Rokok Surya Gandum",
|
||||
},
|
||||
];
|
||||
|
||||
@@ -66,6 +88,7 @@ export default function Admin_Investasi() {
|
||||
const tableBody = listTable.map((e) => (
|
||||
<tr key={e.id}>
|
||||
<td>{e.name}</td>
|
||||
<td>{e.status.id === 1 ? <Badge variant="dot" color="green" >{e.status.name}</Badge> : <Badge variant="dot" color="red">{e.status.name}</Badge> }</td>
|
||||
<td>
|
||||
<ActionIcon variant="transparent"
|
||||
onClick={() => router.push(RouterAdminInvestasi.halaman_aksi + `${e.id}`)}
|
||||
@@ -101,15 +124,18 @@ export default function Admin_Investasi() {
|
||||
<Center my={"xs"}>
|
||||
<Text>List Investasi</Text>
|
||||
</Center>
|
||||
<Table withBorder>
|
||||
<ScrollArea w={"100%"}>
|
||||
<Table withBorder highlightOnHover >
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nama Proyek Investasi</th>
|
||||
<th>Status</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>{tableBody}</tbody>
|
||||
</Table>
|
||||
</ScrollArea>
|
||||
</Box>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
Box,
|
||||
Burger,
|
||||
Drawer,
|
||||
Footer,
|
||||
Group,
|
||||
Header,
|
||||
MediaQuery,
|
||||
@@ -57,10 +58,27 @@ export default function AdminLayout({
|
||||
return (
|
||||
<>
|
||||
<AppShell
|
||||
// footer={
|
||||
// <Footer height={50}>
|
||||
// {/* Web View */}
|
||||
// <MediaQuery smallerThan={"md"} styles={{ display: "none" }}>
|
||||
// <Group position="apart">
|
||||
// <Text>1</Text>
|
||||
// <Text>1</Text>
|
||||
// <Text>1</Text>
|
||||
// </Group>
|
||||
// </MediaQuery>
|
||||
|
||||
// {/* <MediaQuery smallerThan={"md"} styles={{ display: "none", borderStyle: "transparent" }}>
|
||||
// <Text>ok</Text>
|
||||
// </MediaQuery> */}
|
||||
// </Footer>
|
||||
// }
|
||||
header={
|
||||
<Header height={50}>
|
||||
<Group h={50} align="center" px={"md"} position="apart">
|
||||
<MediaQuery largerThan="sm" styles={{ display: "none" }}>
|
||||
{/* Mobile View */}
|
||||
<MediaQuery largerThan="md" styles={{ display: "none" }}>
|
||||
<Group h={50} align="center" px={"md"} position="apart">
|
||||
<Burger
|
||||
opened={opened}
|
||||
onClick={() => setOpened((o) => !o)}
|
||||
@@ -68,19 +86,42 @@ export default function AdminLayout({
|
||||
color={theme.colors.gray[6]}
|
||||
mr="xl"
|
||||
/>
|
||||
</MediaQuery>
|
||||
<Title order={6}>Dashboard Admin</Title>
|
||||
<ActionIcon variant="transparent" onClick={() => router.push(RouterHome.main_home)}>
|
||||
<IconLogout color="red" />
|
||||
</ActionIcon>
|
||||
</Group>
|
||||
<Title order={6}>Dashboard Admin</Title>
|
||||
<ActionIcon
|
||||
variant="transparent"
|
||||
onClick={() => router.push(RouterHome.main_home)}
|
||||
>
|
||||
<IconLogout color="red" />
|
||||
</ActionIcon>
|
||||
</Group>
|
||||
</MediaQuery>
|
||||
|
||||
{/* Web View */}
|
||||
<MediaQuery smallerThan={"md"} styles={{ display: "none" }}>
|
||||
<Group position="apart" align="center" h={50} px={"md"}>
|
||||
<Title order={4}>Dashboard Admin</Title>
|
||||
<Group>
|
||||
{listAdminPage.map((e) => (
|
||||
<Text key={e.id} onClick={() => router.push(e.route)}>
|
||||
{e.name}
|
||||
</Text>
|
||||
))}
|
||||
</Group>
|
||||
<ActionIcon
|
||||
variant="transparent"
|
||||
onClick={() => router.push(RouterHome.main_home)}
|
||||
>
|
||||
<IconLogout color="red" />
|
||||
</ActionIcon>
|
||||
</Group>
|
||||
</MediaQuery>
|
||||
</Header>
|
||||
}
|
||||
>
|
||||
{children}
|
||||
</AppShell>
|
||||
<Drawer opened={opened} onClose={() => setOpened(false)} size={"50%"}>
|
||||
<Stack spacing={"lg"}>
|
||||
<Stack spacing={"xl"}>
|
||||
{listAdminPage.map((e) => (
|
||||
<Text key={e.id} onClick={() => router.push(e.route)}>
|
||||
{e.name}
|
||||
|
||||
Reference in New Issue
Block a user