Fix: Avatar
Deskripsi: - Avatar job - Avatar collaboration - Avatar event ## No Issuue
This commit is contained in:
@@ -1,16 +1,15 @@
|
||||
"use client";
|
||||
|
||||
import { RouterJob } from "@/app/lib/router_hipmi/router_job";
|
||||
import ComponentGlobal_AuthorNameOnHeader from "@/app_modules/_global/author_name_on_header";
|
||||
import {
|
||||
MainColor,
|
||||
AccentColor,
|
||||
} from "@/app_modules/_global/color/color_pallet";
|
||||
import { ComponentGlobal_CardLoadingOverlay } from "@/app_modules/_global/component";
|
||||
import { Card, Grid, Center, Text } from "@mantine/core";
|
||||
import { MODEL_JOB } from "../../model/interface";
|
||||
ComponentGlobal_AvatarAndUsername,
|
||||
ComponentGlobal_CardLoadingOverlay,
|
||||
ComponentGlobal_CardStyles,
|
||||
} from "@/app_modules/_global/component";
|
||||
import { Center, Stack, Text } from "@mantine/core";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import { MODEL_JOB } from "../../model/interface";
|
||||
|
||||
export default function ComponentJob_BerandaCardView({
|
||||
data,
|
||||
@@ -19,52 +18,29 @@ export default function ComponentJob_BerandaCardView({
|
||||
}) {
|
||||
const router = useRouter();
|
||||
const [visible, setVisible] = useState(false);
|
||||
const [jobId, setJobId] = useState("");
|
||||
|
||||
return (
|
||||
<>
|
||||
<Card
|
||||
mb={"md"}
|
||||
shadow="lg"
|
||||
p={30}
|
||||
radius={"md"}
|
||||
style={{
|
||||
backgroundColor: MainColor.darkblue,
|
||||
border: `2px solid ${AccentColor.blue}`,
|
||||
}}
|
||||
>
|
||||
<Card.Section style={{ zIndex: 99 }}>
|
||||
<ComponentGlobal_AuthorNameOnHeader
|
||||
authorName={data.Author.username}
|
||||
imagesId={data.Author.Profile.imagesId}
|
||||
profileId={data.Author.Profile.id}
|
||||
isPembatas={true}
|
||||
<ComponentGlobal_CardStyles>
|
||||
<Stack>
|
||||
<ComponentGlobal_AvatarAndUsername
|
||||
profile={data.Author.Profile as any}
|
||||
/>
|
||||
</Card.Section>
|
||||
<Card.Section
|
||||
onClick={() => {
|
||||
visible ? "" : setJobId(data.id),
|
||||
setVisible(true),
|
||||
router.push(RouterJob.main_detail + data.id);
|
||||
}}
|
||||
mt={"lg"}
|
||||
>
|
||||
<Grid>
|
||||
<Grid.Col span={"auto"}>
|
||||
<Center h={"100%"}>
|
||||
<Text fw={"bold"} fz={"xl"} lineClamp={1} c={"white"}>
|
||||
{data.title}
|
||||
</Text>
|
||||
</Center>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
</Card.Section>
|
||||
{visible && data.id === jobId ? (
|
||||
<ComponentGlobal_CardLoadingOverlay />
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
</Card>
|
||||
|
||||
<Center
|
||||
h={50}
|
||||
onClick={() => {
|
||||
setVisible(true), router.push(RouterJob.main_detail + data.id);
|
||||
}}
|
||||
>
|
||||
<Text fw={"bold"} fz={"xl"} lineClamp={1} c={"white"}>
|
||||
{data.title}
|
||||
</Text>
|
||||
</Center>
|
||||
|
||||
{visible && <ComponentGlobal_CardLoadingOverlay />}
|
||||
</Stack>
|
||||
</ComponentGlobal_CardStyles>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
"use client";
|
||||
|
||||
import {
|
||||
ComponentGlobal_CardStyles,
|
||||
ComponentGlobal_LoadImage,
|
||||
ComponentGlobal_NotUserLoadImage,
|
||||
} from "@/app_modules/_global/component";
|
||||
import {
|
||||
Card,
|
||||
Center,
|
||||
Image,
|
||||
Skeleton,
|
||||
Stack,
|
||||
Text,
|
||||
Title,
|
||||
} from "@mantine/core";
|
||||
import { MODEL_JOB } from "../../model/interface";
|
||||
|
||||
export default function ComponentJob_NotUserDetailData({
|
||||
data,
|
||||
}: {
|
||||
data?: MODEL_JOB;
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
{data ? (
|
||||
<ComponentGlobal_CardStyles>
|
||||
<Stack spacing={"xl"}>
|
||||
{data.imageId && (
|
||||
<ComponentGlobal_NotUserLoadImage fileId={data?.imageId} />
|
||||
)}
|
||||
|
||||
<Stack>
|
||||
<Center>
|
||||
<Text fz={20} fw={"bold"}>
|
||||
{data.title}
|
||||
</Text>
|
||||
</Center>
|
||||
<Stack spacing={0}>
|
||||
<Text>
|
||||
<div dangerouslySetInnerHTML={{ __html: data.content }} />
|
||||
</Text>
|
||||
<Text>
|
||||
<div dangerouslySetInnerHTML={{ __html: data.deskripsi }} />
|
||||
</Text>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</ComponentGlobal_CardStyles>
|
||||
) : (
|
||||
<ComponentGlobal_CardStyles>
|
||||
<Stack spacing={"xl"}>
|
||||
<Title order={3} align="center">
|
||||
Data Not Found
|
||||
</Title>
|
||||
</Stack>
|
||||
</ComponentGlobal_CardStyles>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,17 +1,17 @@
|
||||
"use client";
|
||||
|
||||
import {
|
||||
AccentColor,
|
||||
MainColor,
|
||||
} from "@/app_modules/_global/color/color_pallet";
|
||||
import { ComponentGlobal_LoadImage } from "@/app_modules/_global/component";
|
||||
ComponentGlobal_CardStyles,
|
||||
ComponentGlobal_LoadImage,
|
||||
} from "@/app_modules/_global/component";
|
||||
import {
|
||||
Card,
|
||||
Center,
|
||||
Image,
|
||||
Skeleton,
|
||||
Stack,
|
||||
Text
|
||||
Text,
|
||||
Title,
|
||||
} from "@mantine/core";
|
||||
import { MODEL_JOB } from "../../model/interface";
|
||||
|
||||
@@ -20,85 +20,40 @@ export default function ComponentJob_DetailData({
|
||||
}: {
|
||||
data?: MODEL_JOB;
|
||||
}) {
|
||||
|
||||
return (
|
||||
<>
|
||||
{/* <pre>{JSON.stringify(data, null, 2)}</pre> */}
|
||||
|
||||
{data ? (
|
||||
<Card
|
||||
shadow="lg"
|
||||
withBorder
|
||||
p={30}
|
||||
style={{
|
||||
backgroundColor: MainColor.darkblue,
|
||||
border: `2px solid ${AccentColor.blue}`,
|
||||
}}
|
||||
c={"white"}
|
||||
>
|
||||
<Card.Section px={"xs"} pb={"lg"}>
|
||||
<Stack spacing={"xl"}>
|
||||
{data.imageId && (
|
||||
<ComponentGlobal_LoadImage fileId={data?.imageId} />
|
||||
)}
|
||||
<ComponentGlobal_CardStyles>
|
||||
<Stack spacing={"xl"}>
|
||||
{data.imageId && (
|
||||
<ComponentGlobal_LoadImage fileId={data?.imageId} />
|
||||
)}
|
||||
|
||||
<Stack>
|
||||
<Center>
|
||||
<Text fz={20} fw={"bold"}>
|
||||
{data.title}
|
||||
</Text>
|
||||
</Center>
|
||||
<Stack spacing={0}>
|
||||
<Text>
|
||||
<div dangerouslySetInnerHTML={{ __html: data.content }} />
|
||||
</Text>
|
||||
<Text>
|
||||
<div dangerouslySetInnerHTML={{ __html: data.deskripsi }} />
|
||||
</Text>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Card.Section>
|
||||
</Card>
|
||||
) : (
|
||||
<Card shadow="lg" withBorder p={30}>
|
||||
<Card.Section px={"xs"} pb={"lg"}>
|
||||
<Stack spacing={"xl"}>
|
||||
<Stack align="center">
|
||||
<Image alt="" src={"/aset/no-file.png"} mah={500} maw={200} />
|
||||
<Stack>
|
||||
<Center>
|
||||
<Text fz={20} fw={"bold"}>
|
||||
Judul Lowongan Kerja
|
||||
{data.title}
|
||||
</Text>
|
||||
</Stack>
|
||||
|
||||
<Stack>
|
||||
<Text fw={"bold"} fz={"xs"}>
|
||||
Syarat & Ketentuan :
|
||||
</Center>
|
||||
<Stack spacing={0}>
|
||||
<Text>
|
||||
<div dangerouslySetInnerHTML={{ __html: data.content }} />
|
||||
</Text>
|
||||
<Stack>
|
||||
{Array(5)
|
||||
.fill(0)
|
||||
.map((e, i) => (
|
||||
<Skeleton key={i} height={8} radius="xl" />
|
||||
))}
|
||||
</Stack>
|
||||
</Stack>
|
||||
|
||||
<Stack>
|
||||
<Text fw={"bold"} fz={"xs"}>
|
||||
Deskripsi
|
||||
<Text>
|
||||
<div dangerouslySetInnerHTML={{ __html: data.deskripsi }} />
|
||||
</Text>
|
||||
<Stack>
|
||||
{Array(5)
|
||||
.fill(0)
|
||||
.map((e, i) => (
|
||||
<Skeleton key={i} height={8} radius="xl" />
|
||||
))}
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Card.Section>
|
||||
</Card>
|
||||
</Stack>
|
||||
</ComponentGlobal_CardStyles>
|
||||
) : (
|
||||
<ComponentGlobal_CardStyles>
|
||||
<Stack spacing={"xl"}>
|
||||
<Title order={3} align="center">
|
||||
Data Not Found
|
||||
</Title>
|
||||
</Stack>
|
||||
</ComponentGlobal_CardStyles>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user