Fix: Avatar
Deskripsi: - Avatar job - Avatar collaboration - Avatar event ## No Issuue
This commit is contained in:
3
src/app_modules/job/_ui/index.ts
Normal file
3
src/app_modules/job/_ui/index.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import { Job_UiNotUserView } from "./ui_not_user_view_job";
|
||||
|
||||
export { Job_UiNotUserView };
|
||||
21
src/app_modules/job/_ui/ui_not_user_view_job.tsx
Normal file
21
src/app_modules/job/_ui/ui_not_user_view_job.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
"use client";
|
||||
|
||||
import {
|
||||
UIGlobal_LayoutHeaderTamplate,
|
||||
UIGlobal_LayoutTamplate,
|
||||
} from "@/app_modules/_global/ui";
|
||||
import { Job_ViewNotUserJobVacany } from "../_view";
|
||||
|
||||
export function Job_UiNotUserView({ data }: { data: any }) {
|
||||
return (
|
||||
<>
|
||||
<UIGlobal_LayoutTamplate
|
||||
header={
|
||||
<UIGlobal_LayoutHeaderTamplate title="Job Vacancy" hideButtonLeft />
|
||||
}
|
||||
>
|
||||
<Job_ViewNotUserJobVacany data={data} />
|
||||
</UIGlobal_LayoutTamplate>
|
||||
</>
|
||||
);
|
||||
}
|
||||
3
src/app_modules/job/_view/index.ts
Normal file
3
src/app_modules/job/_view/index.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import { Job_ViewNotUserJobVacany } from "./view_not_user_view_job";
|
||||
|
||||
export { Job_ViewNotUserJobVacany };
|
||||
45
src/app_modules/job/_view/view_not_user_view_job.tsx
Normal file
45
src/app_modules/job/_view/view_not_user_view_job.tsx
Normal file
@@ -0,0 +1,45 @@
|
||||
import {
|
||||
ComponentGlobal_CardStyles,
|
||||
ComponentGlobal_NotUserLoadImage,
|
||||
} from "@/app_modules/_global/component";
|
||||
import { Center, Stack, Text, Title } from "@mantine/core";
|
||||
|
||||
export function Job_ViewNotUserJobVacany({ data }: { data: any }) {
|
||||
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,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>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -1,37 +1,40 @@
|
||||
"use client";
|
||||
|
||||
import { RouterJob } from "@/app/lib/router_hipmi/router_job";
|
||||
import { Button, Center, Stack } from "@mantine/core";
|
||||
import { useShallowEffect } from "@mantine/hooks";
|
||||
import { IconBrandWhatsapp } from "@tabler/icons-react";
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import ComponentJob_DetailData from "../../component/detail/detail_data";
|
||||
import { MODEL_JOB } from "../../model/interface";
|
||||
|
||||
export default function Job_MainDetail({
|
||||
dataJob,
|
||||
hostName,
|
||||
}: {
|
||||
dataJob: MODEL_JOB;
|
||||
hostName: string;
|
||||
}) {
|
||||
export default function Job_MainDetail({ dataJob }: { dataJob: MODEL_JOB }) {
|
||||
return (
|
||||
<>
|
||||
<Stack>
|
||||
<ComponentJob_DetailData data={dataJob} />
|
||||
<ButtonAction jobId={dataJob.id} hostName={hostName} />
|
||||
<ButtonAction jobId={dataJob.id} />
|
||||
</Stack>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function ButtonAction({
|
||||
jobId,
|
||||
hostName,
|
||||
}: {
|
||||
jobId: string;
|
||||
hostName: string;
|
||||
}) {
|
||||
const router = useRouter();
|
||||
function ButtonAction({ jobId }: { jobId: string }) {
|
||||
const [origin, setOrigin] = useState("");
|
||||
|
||||
useShallowEffect(() => {
|
||||
onLoadOrigin(setOrigin);
|
||||
// if (typeof window !== "undefined") {
|
||||
// setOrigin(window.location.origin);
|
||||
// }
|
||||
}, [setOrigin]);
|
||||
|
||||
async function onLoadOrigin(setOrigin: any) {
|
||||
const res = await fetch("/api/zz-makuro");
|
||||
const result = await res.json();
|
||||
setOrigin(result.origin);
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -44,8 +47,7 @@ function ButtonAction({
|
||||
>
|
||||
<Link
|
||||
style={{ textDecoration: "none", color: "white" }}
|
||||
href={`whatsapp://send?text=Job Vacancy HIPMI BADUNG : ${hostName}/dev/job/non_user_view/${jobId}`}
|
||||
// href={`https://t.me/share/url?url={${"http://localhost:3000/dev/job/non_user_view"}}&text={Lowongan Kerja Ini}`}
|
||||
href={`whatsapp://send?text=Job Vacancy HIPMI BADUNG : ${origin}${RouterJob.job_vacancy_non_user({ id: jobId })}`}
|
||||
>
|
||||
Bagikan ke WhatsApp
|
||||
</Link>
|
||||
|
||||
@@ -45,7 +45,7 @@ export function Job_UiBeranda({ listData }: { listData: MODEL_JOB[] }) {
|
||||
setData(val);
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
mqtt_client.subscribe("Job_new_post");
|
||||
mqtt_client.on("message", (topic, message) => {
|
||||
if (topic === "Job_new_post") {
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
"use client";
|
||||
|
||||
import { AppShell, Center } from "@mantine/core";
|
||||
import React from "react";
|
||||
import ComponentJob_HeaderTamplate from "../component/header_tamplate";
|
||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
||||
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/_global/ui/ui_header_tamplate";
|
||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
||||
import React from "react";
|
||||
|
||||
export default function LayoutJob_NonUserView({
|
||||
children,
|
||||
@@ -15,7 +12,7 @@ export default function LayoutJob_NonUserView({
|
||||
return (
|
||||
<>
|
||||
<UIGlobal_LayoutTamplate
|
||||
header={<UIGlobal_LayoutHeaderTamplate title="Job Vacancy" />}
|
||||
header={<UIGlobal_LayoutHeaderTamplate title="Job Vacancy" hideButtonLeft />}
|
||||
>
|
||||
{children}
|
||||
</UIGlobal_LayoutTamplate>
|
||||
|
||||
@@ -1,84 +1,12 @@
|
||||
"use client";
|
||||
|
||||
import {
|
||||
Card,
|
||||
Center,
|
||||
Image,
|
||||
Overlay,
|
||||
Stack,
|
||||
Text,
|
||||
Title,
|
||||
} from "@mantine/core";
|
||||
import ComponentJob_DetailData from "../component/detail/detail_data";
|
||||
import { RouterJob } from "@/app/lib/router_hipmi/router_job";
|
||||
import { data } from "autoprefixer";
|
||||
import { MODEL_JOB } from "../model/interface";
|
||||
import {
|
||||
AccentColor,
|
||||
MainColor,
|
||||
} from "@/app_modules/_global/color/color_pallet";
|
||||
import { APIs } from "@/app/lib";
|
||||
|
||||
export default function Job_NonUserView({ data }: { data: MODEL_JOB }) {
|
||||
return (
|
||||
<>
|
||||
<Center my={"md"}>
|
||||
<Card
|
||||
shadow="lg"
|
||||
withBorder
|
||||
p={"xl"}
|
||||
// w={{ base: 400 }}
|
||||
style={{
|
||||
backgroundColor: MainColor.darkblue,
|
||||
border: `2px solid ${AccentColor.blue}`,
|
||||
}}
|
||||
>
|
||||
<Card.Section px={"xs"} pb={"lg"} c={"white"}>
|
||||
<Stack spacing={"xl"}>
|
||||
{data.imageId ? (
|
||||
<Stack align="center">
|
||||
<Image
|
||||
radius={"sm"}
|
||||
alt=""
|
||||
src={APIs.GET({ fileId: data.imageId })}
|
||||
maw={200}
|
||||
/>
|
||||
</Stack>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
|
||||
<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>
|
||||
{data?.isArsip === true && (
|
||||
<Overlay color="gray" opacity={0.5} blur={1}>
|
||||
<Stack align="center" h={"100%"} justify="center">
|
||||
<Title c={"red"} fw={"bold"} order={3}>
|
||||
Mohon Maaf !
|
||||
</Title>
|
||||
<Title c={"red"} fw={"bold"} order={3}>
|
||||
Lowongan Kerja Ini Sudah Ditutup{" "}
|
||||
</Title>
|
||||
</Stack>
|
||||
</Overlay>
|
||||
)}
|
||||
</Card>
|
||||
</Center>
|
||||
<ComponentJob_DetailData data={data} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user