Fix: User search & Event

Deskripsi:
- Tampilan avatar dan username
## NO Issue
This commit is contained in:
2024-09-30 11:01:17 +08:00
parent b13110be6f
commit ca5c30499a
80 changed files with 1764 additions and 918 deletions

View File

@@ -1,17 +1,48 @@
"use client";
import {
ComponentGlobal_AvatarAndUsername,
ComponentGlobal_LoaderAvatar,
} from "@/app_modules/_global/component";
import ComponentGlobal_Loader from "@/app_modules/_global/component/loader";
import {
UIGlobal_LayoutHeaderTamplate,
UIGlobal_LayoutTamplate,
} from "@/app_modules/_global/ui";
import {
ActionIcon,
Avatar,
Box,
Center,
Group,
Image,
Loader,
Paper,
Text,
} from "@mantine/core";
import { useShallowEffect } from "@mantine/hooks";
import { IconDots } from "@tabler/icons-react";
import { useState } from "react";
export default function Page() {
return (
<>
<UIGlobal_LayoutTamplate
header={<UIGlobal_LayoutHeaderTamplate title="Contoh" />}
>
<Paper p={"sm"}>
<ComponentGlobal_AvatarAndUsername
profile={{ id: "1" as any, name: "wibu" as any }}
component={
<Group position="right">
<Text lineClamp={1}>{Intl.DateTimeFormat("id-ID", {dateStyle: "full"}).format(new Date())}</Text>
</Group>
}
/>
</Paper>
</UIGlobal_LayoutTamplate>
</>
);
return (
<>
<Box p={"lg"} bg={"gray"} h={"100vh"}>

View File

@@ -0,0 +1,11 @@
import { UIGlobal_ImagePreview } from "@/app_modules/_global/ui";
export default async function Page({ params }: { params: { id: string } }) {
const fileId = params.id;
return (
<>
<UIGlobal_ImagePreview fileId={fileId} />
</>
);
}

View File

@@ -1,8 +1,8 @@
import { Event_DetailDraft } from "@/app_modules/event"
import { Event_getOneById } from "@/app_modules/event/fun/get/get_one_by_id"
import { event_getOneById } from "@/app_modules/event/fun/get/get_one_by_id"
export default async function Page({ params }: { params: { id: string } }) {
let eventId = params.id
const dataEvent = await Event_getOneById(eventId)
const dataEvent = await event_getOneById(eventId)
return <Event_DetailDraft dataEvent={dataEvent as any} />
}

View File

@@ -1,11 +1,11 @@
import { Event_DetailKontribusi } from "@/app_modules/event";
import { Event_countTotalPesertaById } from "@/app_modules/event/fun/count/count_total_peserta_by_id";
import { Event_getListPesertaById } from "@/app_modules/event/fun/get/get_list_peserta_by_id";
import { Event_getOneById } from "@/app_modules/event/fun/get/get_one_by_id";
import { event_getOneById } from "@/app_modules/event/fun/get/get_one_by_id";
export default async function Page({ params }: { params: { id: string } }) {
let eventId = params.id;
const dataEvent = await Event_getOneById(eventId);
const dataEvent = await event_getOneById(eventId);
const listKontributor = await Event_getListPesertaById(eventId);
const totalPeserta = await Event_countTotalPesertaById(eventId)
return (

View File

@@ -3,13 +3,13 @@ import { Event_DetailMain } from "@/app_modules/event";
import { Event_countTotalPesertaById } from "@/app_modules/event/fun/count/count_total_peserta_by_id";
import { Event_CekUserJoinById } from "@/app_modules/event/fun/get/cek_user_join_by_id";
import { Event_getListPesertaById } from "@/app_modules/event/fun/get/get_list_peserta_by_id";
import { Event_getOneById } from "@/app_modules/event/fun/get/get_one_by_id";
import { event_getOneById } from "@/app_modules/event/fun/get/get_one_by_id";
export default async function Page({ params }: { params: { id: string } }) {
let eventId = params.id;
const userLoginId = await funGetUserIdByToken();
const dataEvent = await Event_getOneById(eventId);
const dataEvent = await event_getOneById(eventId);
const listPeserta = await Event_getListPesertaById(eventId);
const isJoin = await Event_CekUserJoinById(eventId, userLoginId);
const totalPeserta = await Event_countTotalPesertaById(eventId);

View File

@@ -1,11 +1,11 @@
import { Event_DetailPublish } from "@/app_modules/event";
import { Event_countTotalPesertaById } from "@/app_modules/event/fun/count/count_total_peserta_by_id";
import { Event_getListPesertaById } from "@/app_modules/event/fun/get/get_list_peserta_by_id";
import { Event_getOneById } from "@/app_modules/event/fun/get/get_one_by_id";
import { event_getOneById } from "@/app_modules/event/fun/get/get_one_by_id";
export default async function Page({ params }: { params: { id: string } }) {
let eventId = params.id;
const dataEvent = await Event_getOneById(eventId);
const dataEvent = await event_getOneById(eventId);
const listPeserta = await Event_getListPesertaById(eventId);
const totalPeserta = await Event_countTotalPesertaById(eventId);

View File

@@ -1,9 +1,9 @@
import { Event_DetailReject } from "@/app_modules/event";
import { Event_getOneById } from "@/app_modules/event/fun/get/get_one_by_id";
import { event_getOneById } from "@/app_modules/event/fun/get/get_one_by_id";
export default async function Page({params}: {params: {id: string}}) {
let eventId = params.id
const dataEvent = await Event_getOneById(eventId)
const dataEvent = await event_getOneById(eventId)
return <Event_DetailReject dataEvent={dataEvent as any}/>;
}

View File

@@ -1,10 +1,10 @@
import { Event_DetailReview } from "@/app_modules/event";
import { Event_getOneById } from "@/app_modules/event/fun/get/get_one_by_id";
import { event_getOneById } from "@/app_modules/event/fun/get/get_one_by_id";
export default async function Page({params}: {params: {id: string}}) {
let eventId = params.id
const dataEvent = await Event_getOneById(eventId)
const dataEvent = await event_getOneById(eventId)
return <Event_DetailReview dataEvent={dataEvent as any}/>;
}

View File

@@ -2,11 +2,11 @@
import { Event_DetailRiwayat } from "@/app_modules/event";
import { Event_countTotalPesertaById } from "@/app_modules/event/fun/count/count_total_peserta_by_id";
import { Event_getListPesertaById } from "@/app_modules/event/fun/get/get_list_peserta_by_id";
import { Event_getOneById } from "@/app_modules/event/fun/get/get_one_by_id";
import { event_getOneById } from "@/app_modules/event/fun/get/get_one_by_id";
export default async function Page({ params }: { params: { id: string } }) {
let eventId = params.id;
const dataEvent = await Event_getOneById(eventId);
const dataEvent = await event_getOneById(eventId);
const listPeserta = await Event_getListPesertaById(eventId);
const totalPeserta = await Event_countTotalPesertaById(eventId);

View File

@@ -1,12 +1,12 @@
import { Event_Edit } from "@/app_modules/event";
import { Event_getOneById } from "@/app_modules/event/fun/get/get_one_by_id";
import { event_getOneById } from "@/app_modules/event/fun/get/get_one_by_id";
import { Event_getMasterTipeAcara } from "@/app_modules/event/fun/master/get_tipe_acara";
import { MODEL_EVENT } from "@/app_modules/event/model/interface";
import _ from "lodash";
export default async function Page({ params }: { params: { id: string } }) {
let eventId = params.id;
const data = await Event_getOneById(eventId);
const data = await event_getOneById(eventId);
const dataEvent = _.omit(data, [
"Author",
"EventMaster_Status",

View File

@@ -2,7 +2,7 @@ import { Event_Beranda } from "@/app_modules/event";
import { event_getListAllPublish } from "@/app_modules/event/fun/get/get_list_all_publish";
export default async function Page() {
const dataEvent = await event_getListAllPublish({page: 1});
const dataEvent = await event_getListAllPublish({ page: 1 });
return (
<>

View File

@@ -1,4 +1,3 @@
import ComponentGlobal_IsEmptyData from "@/app_modules/_global/component/is_empty_data";
import { map_funGetAllMap } from "@/app_modules/map/fun/get/fun_get_all_map";
import { Map_View } from "@/app_modules/map/view";

View File

@@ -1,7 +1,9 @@
import APIs from "./APIs";
import DIRECTORY_ID from "./id-derectory";
import prisma from "./prisma";
import { pathAssetImage } from "./path_asset_image";
export { DIRECTORY_ID };
export { prisma };
export { APIs };
export { pathAssetImage as RouterAssetImage };

View File

@@ -0,0 +1,6 @@
export const pathAssetImage = {
no_image: "/aset/global/no-image.svg",
avatar: "/aset/global/avatar.png",
main_background: "/aset/global/main_background.png",
new_loader: "/aset/global/loading.gif",
};

View File

@@ -0,0 +1,3 @@
export const routerImagePreview = {
"main": ({ id }: { id: string }) => `/dev/image-preview/${id}`,
};

View File

@@ -1,5 +1,6 @@
export const RouterProfile = {
katalog: "/dev/katalog/",
katalogOLD: "/dev/katalog/",
"katalog": ({id}:{id: string}) => `/dev/katalog/${id}`,
// create
create: "/dev/profile/create",

View File

@@ -18,7 +18,10 @@ export function RealtimePage({ token }: { token: string }) {
function onKirim() {
setData({
id: "123",
data: Math.random().toString(),
data: {
"topic":"test",
}
});
}
return (