# Event Join

## feat
- Join event
- kontribusi event
- histoty in progress
### No Issue
This commit is contained in:
2024-01-29 22:03:27 +08:00
parent bec87028fd
commit ca9214d9e0
109 changed files with 2932 additions and 515 deletions

View File

@@ -17,7 +17,7 @@ import {
import { ProfileView } from "../profile";
import { ListPortofolioView } from "../portofolio";
import { MODEL_PROFILE_OLD } from "@/app_modules/home/model/user_profile";
import { LIST_PORTOFOLIO } from "@/app_modules/models/portofolio";
import { LIST_PORTOFOLIO } from "@/app_modules/model_global/portofolio";
import User_Logout from "@/app_modules/auth/logout/view";
import { MODEL_PORTOFOLIO } from "../portofolio/model/interface";
import { MODEL_PROFILE } from "../profile/model/interface";

View File

@@ -6,7 +6,7 @@ import { Warna } from "@/app/lib/warna";
import {
BIDANG_BISNIS_OLD,
MODEL_PORTOFOLIO_OLD,
} from "@/app_modules/models/portofolio";
} from "@/app_modules/model_global/portofolio";
import {
AspectRatio,
Button,

View File

@@ -1,7 +1,7 @@
"use server";
import prisma from "@/app/lib/prisma";
import { MODEL_PORTOFOLIO_OLD } from "@/app_modules/models/portofolio";
import { MODEL_PORTOFOLIO_OLD } from "@/app_modules/model_global/portofolio";
import { revalidatePath } from "next/cache";
import { MODEL_PORTOFOLIO, MODEL_PORTOFOLIO_MEDSOS } from "../model/interface";
import _ from "lodash";

View File

@@ -6,6 +6,7 @@ import {
Grid,
Group,
Paper,
SimpleGrid,
Stack,
Text,
Title,
@@ -14,12 +15,15 @@ import { useShallowEffect } from "@mantine/hooks";
import { useState } from "react";
import _ from "lodash";
import {
IconCaretRight,
IconCaretRightFilled,
IconChevronRight,
IconCirclePlus,
IconEyeCheck,
IconPencilPlus,
} from "@tabler/icons-react";
import { LIST_PORTOFOLIO } from "@/app_modules/models/portofolio";
import { LIST_PORTOFOLIO } from "@/app_modules/model_global/portofolio";
import { useRouter } from "next/navigation";
import { RouterPortofolio } from "@/app/lib/router_hipmi/router_katalog";
import { Warna } from "@/app/lib/warna";
@@ -65,31 +69,43 @@ export default function ListPortofolioView({
</Text>
</Center>
) : (
<Box>
{porto.map((e: any) => (
<Paper
key={e.id}
h={50}
bg={"gray"}
mb={"lg"}
radius={"xl"}
onClick={() => router.push(`/dev/portofolio/main/${e.id}/`)}
>
<Grid h={50} align="center" px={"md"}>
<Grid.Col span={10}>
<Text fw={"bold"}>{e.namaBisnis}</Text>
</Grid.Col>
<Grid.Col span={"auto"} h={50}>
<IconCaretRightFilled size={35} />
</Grid.Col>
</Grid>
</Paper>
))}
</Box>
<SimpleGrid
cols={4}
spacing="md"
breakpoints={[
{ maxWidth: "md", cols: 3, spacing: "md" },
{ maxWidth: "sm", cols: 2, spacing: "sm" },
{ maxWidth: "xs", cols: 1, spacing: "sm" },
]}
>
{porto.map((e: any) => (
<Paper
key={e.id}
bg={"gray.5"}
radius={"md"}
onClick={() => router.push(`/dev/portofolio/main/${e.id}/`)}
>
<Grid align="center" p={"sm"}>
<Grid.Col span={"auto"}>
<Text fw={"bold"} truncate>
{e.namaBisnis}
</Text>
</Grid.Col>
<Grid.Col span={2}>
<Stack>
<IconCaretRight color="black" size={35} />
</Stack>
</Grid.Col>
</Grid>
</Paper>
))}
</SimpleGrid>
)}
</Box>
</Stack>
</Paper>
</>
);
}

View File

@@ -5,7 +5,7 @@ import {
RouterProfile,
} from "@/app/lib/router_hipmi/router_katalog";
import { Warna } from "@/app/lib/warna";
import { MODEL_PORTOFOLIO_OLD } from "@/app_modules/models/portofolio";
import { MODEL_PORTOFOLIO_OLD } from "@/app_modules/model_global/portofolio";
import {
AspectRatio,
Box,

View File

@@ -1,4 +1,4 @@
import { MODEL_IMAGES } from "@/app_modules/models/interface";
import { MODEL_IMAGES } from "@/app_modules/model_global/interface";
export interface MODEL_PORTOFOLIO {
id: string;

View File

@@ -13,6 +13,7 @@ import {
Group,
Image,
Paper,
Stack,
Text,
} from "@mantine/core";
import { useShallowEffect } from "@mantine/hooks";
@@ -50,6 +51,8 @@ export default function ProfileView({
{/* <pre>{JSON.stringify(profile, null,2)}</pre> */}
<Paper p={"sm"} bg={"gray.1"} shadow="lg" withBorder>
{/* Background dan foto */}
{/* Upload Background Profile */}
<Box>
<AspectRatio ratio={16 / 9}>
<Paper radius={"sm"} shadow="md">
@@ -64,31 +67,36 @@ export default function ProfileView({
/>
</Paper>
</AspectRatio>
{/* Upload Background Profile */}
{profile.User.id === userLoginId ? (
<ActionIcon
ml={325}
mt={-10}
bg={"gray.5"}
variant="transparent"
radius={50}
onClick={() =>
router.push(
RouterProfile.update_foto_background + `${profile.id}`
)
}
sx={{
position: "absolute",
zIndex: 2,
border: "1px",
borderStyle: "solid",
}}
>
<IconCamera color="black" size={20} />
</ActionIcon>
<Center>
<ActionIcon
ml={{base: 300, sm: 500, md: 900, lg: 1000}}
mt={-10}
bg={"gray.5"}
variant="transparent"
radius={50}
onClick={() =>
router.push(
RouterProfile.update_foto_background + `${profile.id}`
)
}
sx={{
position: "relative",
// zIndex: 2,
border: "1px",
borderStyle: "solid",
}}
>
<IconCamera color="black" size={20} />
</ActionIcon>
</Center>
) : (
""
)}
{/* Foto Profile */}
<Center>
<Box
sx={{
@@ -112,6 +120,7 @@ export default function ProfileView({
</Box>
</Center>
{/* Upload Foto Profile */}
{profile.User.id === userLoginId ? (
<Center>
<ActionIcon
@@ -141,7 +150,8 @@ export default function ProfileView({
{/* Username dan Nama */}
<Group position="apart">
<Group position="apart" pt={profile.User.id === userLoginId ? 0 : "xl" }>
<Flex direction={"column"} mt={"lg"}>
<Text fz={"lg"} fw={"bold"}>
{profile.name}
@@ -163,7 +173,7 @@ export default function ProfileView({
</Group>
{/* Info user: nomor, email dll */}
<Flex direction={"column"} pt={"lg"}>
<Stack spacing={"xs"} pt={"lg"}>
<Grid>
<Grid.Col span={"content"}>
<IconAddressBook />
@@ -226,7 +236,7 @@ export default function ProfileView({
);
}
})()}
</Flex>
</Stack>
</Paper>
{/* <pre>{JSON.stringify(profile, null, 2)}</pre> */}

View File

@@ -1,5 +1,5 @@
import { MODEL_USER } from "@/app_modules/home/model/interface";
import { MODEL_IMAGES } from "@/app_modules/models/interface";
import { MODEL_IMAGES } from "@/app_modules/model_global/interface";
export interface MODEL_PROFILE {
userId: string;