Intergrasi to API
Deskripsi: - Fix server action collaboration to API
This commit is contained in:
@@ -40,15 +40,15 @@ export default function ComponentColab_CardSectionData({
|
||||
<Stack spacing={"xs"}>
|
||||
<Grid>
|
||||
<Grid.Col span={2}>
|
||||
<Text fw={"bold"} fz={"xs"}>
|
||||
<Text fw={"bold"} >
|
||||
Industri
|
||||
</Text>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={1}>
|
||||
<Text fz={"xs"}>:</Text>
|
||||
<Text >:</Text>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={"auto"}>
|
||||
<Text fz={"xs"} lineClamp={1}>
|
||||
<Text lineClamp={1}>
|
||||
{data?.ProjectCollaborationMaster_Industri.name
|
||||
? data?.ProjectCollaborationMaster_Industri?.name
|
||||
: "Industri"}
|
||||
@@ -58,25 +58,25 @@ export default function ComponentColab_CardSectionData({
|
||||
|
||||
<Grid>
|
||||
<Grid.Col span={2}>
|
||||
<Text fw={"bold"} fz={"xs"}>
|
||||
<Text fw={"bold"} >
|
||||
Lokasi
|
||||
</Text>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={1}>
|
||||
<Text fz={"xs"}>:</Text>
|
||||
<Text >:</Text>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={"auto"}>
|
||||
<Text fz={"xs"} lineClamp={1}>
|
||||
<Text lineClamp={1}>
|
||||
{data?.lokasi ? data?.lokasi : "Lokasi dari proyek"}
|
||||
</Text>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
|
||||
<Stack spacing={5}>
|
||||
<Text fw={"bold"} fz={"xs"}>
|
||||
<Text fw={"bold"} >
|
||||
Tujuan proyek
|
||||
</Text>
|
||||
<Text lineClamp={3} fz={"xs"}>
|
||||
<Text lineClamp={2} >
|
||||
{data?.purpose
|
||||
? data?.purpose
|
||||
: "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Maiores odio nihil in animi expedita, suscipit excepturi pariatur totam esse officiis enim cumque. Quidem, facere aliquam. Sunt laboriosam incidunt iste amet"}
|
||||
|
||||
@@ -30,6 +30,7 @@ import { MODEL_COLLABORATION_PARTISIPASI } from "../../model/interface";
|
||||
import ComponentColab_AuthorNameOnListPartisipan from "./header_author_list_partisipan";
|
||||
import notifikasiToUser_funCreate from "@/app_modules/notifikasi/fun/create/create_notif_to_user";
|
||||
import mqtt_client from "@/util/mqtt_client";
|
||||
import { ComponentGlobal_CardStyles } from "@/app_modules/_global/component";
|
||||
|
||||
export default function ComponentColab_DetailListPartisipasiUser({
|
||||
listPartisipan,
|
||||
@@ -49,6 +50,8 @@ export default function ComponentColab_DetailListPartisipasiUser({
|
||||
const [opened, { open, close }] = useDisclosure(false);
|
||||
const [deskripsi, setDeskripsi] = useState("");
|
||||
|
||||
|
||||
|
||||
async function onJoin() {
|
||||
const res = await colab_funCreatePartisipan(
|
||||
colabId as any,
|
||||
@@ -118,7 +121,6 @@ export default function ComponentColab_DetailListPartisipasiUser({
|
||||
},
|
||||
}}
|
||||
>
|
||||
|
||||
<Stack spacing={"xs"}>
|
||||
<Group position="right">
|
||||
<ActionIcon onClick={close} variant="transparent">
|
||||
@@ -127,7 +129,11 @@ export default function ComponentColab_DetailListPartisipasiUser({
|
||||
</Group>
|
||||
<Textarea
|
||||
maxLength={300}
|
||||
label={<Text c={"white"} mb={"sm"} fw={"bold"}>Deskripsi Diri</Text>}
|
||||
label={
|
||||
<Text c={"white"} mb={"sm"} fw={"bold"}>
|
||||
Deskripsi Diri
|
||||
</Text>
|
||||
}
|
||||
placeholder="Deskripsikan diri anda yang sesuai dengan proyek ini.."
|
||||
minRows={4}
|
||||
onChange={(val) => {
|
||||
@@ -175,15 +181,7 @@ export default function ComponentColab_DetailListPartisipasiUser({
|
||||
""
|
||||
)}
|
||||
|
||||
<Paper
|
||||
style={{
|
||||
border: `2px solid ${AccentColor.softblue}`,
|
||||
backgroundColor: AccentColor.blue,
|
||||
color: "white",
|
||||
borderRadius: "10px",
|
||||
padding: "15px",
|
||||
}}
|
||||
>
|
||||
<ComponentGlobal_CardStyles>
|
||||
<Stack spacing={"xl"}>
|
||||
<Center>
|
||||
<Title order={5}>Partispasi User ({data?.length})</Title>
|
||||
@@ -212,7 +210,7 @@ export default function ComponentColab_DetailListPartisipasiUser({
|
||||
</Box>
|
||||
</ScrollArea>
|
||||
</Stack>
|
||||
</Paper>
|
||||
</ComponentGlobal_CardStyles>
|
||||
</Stack>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
import { Skeleton, Stack } from "@mantine/core";
|
||||
import { ComponentGlobal_CardStyles } from "@/app_modules/_global/component";
|
||||
import { Center, Grid, Skeleton, Stack } from "@mantine/core";
|
||||
|
||||
export function Collaboration_SkeletonCreate() {
|
||||
export {
|
||||
Collaboration_SkeletonCreate,
|
||||
Collaboration_SkeletonBeranda,
|
||||
Collaboration_SkeletonGrup,
|
||||
};
|
||||
|
||||
function Collaboration_SkeletonCreate() {
|
||||
return (
|
||||
<>
|
||||
<Stack px={"xl"} spacing={"lg"}>
|
||||
@@ -26,3 +33,70 @@ export function Collaboration_SkeletonCreate() {
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function Collaboration_SkeletonBeranda() {
|
||||
return (
|
||||
<>
|
||||
{Array.from(new Array(2)).map((e, i) => (
|
||||
<ComponentGlobal_CardStyles marginBottom={"15px"} key={i}>
|
||||
<Stack spacing={"xl"}>
|
||||
<Grid align="center" gutter={"md"}>
|
||||
<Grid.Col span={"content"}>
|
||||
<Skeleton circle height={40} />
|
||||
</Grid.Col>
|
||||
<Grid.Col span={3}>
|
||||
<Skeleton height={20} w={150} />
|
||||
</Grid.Col>
|
||||
{/* <Grid.Col span={3} offset={3}>
|
||||
<Skeleton height={20} w={150} />
|
||||
</Grid.Col> */}
|
||||
</Grid>
|
||||
<Center>
|
||||
<Skeleton height={15} w={200} />
|
||||
</Center>
|
||||
|
||||
<Grid align="center" gutter={"md"}>
|
||||
<Grid.Col span={"content"}>
|
||||
<Skeleton h={15} w={70} />
|
||||
</Grid.Col>
|
||||
<Grid.Col span={3}>
|
||||
<Skeleton height={15} w={200} />
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
|
||||
<Grid align="center" gutter={"md"}>
|
||||
<Grid.Col span={"content"}>
|
||||
<Skeleton h={15} w={70} />
|
||||
</Grid.Col>
|
||||
<Grid.Col span={3}>
|
||||
<Skeleton height={15} w={200} />
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
|
||||
<Stack spacing={"md"}>
|
||||
<Skeleton height={15} w={150} />
|
||||
<Skeleton height={15} w={"100%"} />
|
||||
<Skeleton height={15} w={"100%"} />
|
||||
</Stack>
|
||||
|
||||
<Center>
|
||||
<Skeleton height={15} w={100} />
|
||||
</Center>
|
||||
</Stack>
|
||||
</ComponentGlobal_CardStyles>
|
||||
))}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function Collaboration_SkeletonGrup() {
|
||||
return (
|
||||
<>
|
||||
{Array.from(new Array(2)).map((e, i) => (
|
||||
<ComponentGlobal_CardStyles marginBottom={"15px"} key={i}>
|
||||
<Skeleton h={40} />
|
||||
</ComponentGlobal_CardStyles>
|
||||
))}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user