diff --git a/CHANGELOG.md b/CHANGELOG.md
index 73e2314d..75c82718 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,8 @@
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
+## [1.2.22](https://github.com/bipproduction/hipmi/compare/v1.2.21...v1.2.22) (2024-12-10)
+
## [1.2.21](https://github.com/bipproduction/hipmi/compare/v1.2.20...v1.2.21) (2024-12-09)
## [1.2.20](https://github.com/bipproduction/hipmi/compare/v1.2.19...v1.2.20) (2024-12-09)
diff --git a/package.json b/package.json
index ae8b1fa2..5440fb7a 100644
--- a/package.json
+++ b/package.json
@@ -1,10 +1,10 @@
{
"name": "hipmi",
- "version": "1.2.21",
+ "version": "1.2.22",
"private": true,
"prisma": {
"seed": "npx tsx prisma/seed.ts --yes"
- },
+ },
"scripts": {
"dev": "bun --bun run next dev --experimental-https",
"build": "NODE_OPTIONS='--max-old-space-size=2048' bun --bun run next build",
diff --git a/src/app_modules/admin/event/table_status/table_publish.tsx b/src/app_modules/admin/event/table_status/table_publish.tsx
index 7bcd290b..1553c712 100644
--- a/src/app_modules/admin/event/table_status/table_publish.tsx
+++ b/src/app_modules/admin/event/table_status/table_publish.tsx
@@ -54,7 +54,7 @@ function TableStatus({ listPublish }: { listPublish: any }) {
useShallowEffect(() => {
if (typeof window !== "undefined") {
- console.log(window.location.origin);
+ // console.log(window.location.origin);
setOrigin(window.location.origin);
}
}, [setOrigin]);
diff --git a/src/app_modules/colab/splash/index.tsx b/src/app_modules/colab/splash/index.tsx
index 48839abb..3d6ee713 100644
--- a/src/app_modules/colab/splash/index.tsx
+++ b/src/app_modules/colab/splash/index.tsx
@@ -17,7 +17,7 @@ export default function Colab_Splash() {
setHotMenu(1);
// setStatus("Publish");
router.replace(RouterColab.beranda, {scroll: false});
- }, 1000);
+ }, 500);
}, []);
return (
diff --git a/src/app_modules/crowd/splash/view.tsx b/src/app_modules/crowd/splash/view.tsx
index 65e4e84f..e60ab74a 100644
--- a/src/app_modules/crowd/splash/view.tsx
+++ b/src/app_modules/crowd/splash/view.tsx
@@ -10,7 +10,7 @@ export default function SplashCrowd() {
const router = useRouter();
useShallowEffect(() => {
- setTimeout(() => router.push(RouterCrowd.main), 1000);
+ setTimeout(() => router.push(RouterCrowd.main), 500);
}, []);
return (
<>
diff --git a/src/app_modules/event/_ui/konfirmasi.tsx b/src/app_modules/event/_ui/konfirmasi.tsx
index bc243cc1..ecaa99df 100644
--- a/src/app_modules/event/_ui/konfirmasi.tsx
+++ b/src/app_modules/event/_ui/konfirmasi.tsx
@@ -135,16 +135,6 @@ export default function Ui_Konfirmasi({
);
}
- // Jika sudah join, sudah konfirmasi dan tanggal mulai acara sudah lewat
- // if (isPresent && moment(data?.tanggal).diff(moment(), "minute") < 0)
- if (
- isPresent &&
- isJoin &&
- moment(data?.tanggal).diff(moment(), "minute") < 0
- ) {
- return ;
- }
-
if (isPresent == false && data) {
return (
);
}
+
+ // Jika sudah join, sudah konfirmasi dan tanggal mulai acara sudah lewat
+ // if (isPresent && moment(data?.tanggal).diff(moment(), "minute") < 0)
+ if (
+ isPresent &&
+ isJoin &&
+ moment(data?.tanggal).diff(moment(), "minute") < 0
+ ) {
+ return ;
+ }
}
function DataNotFound() {
diff --git a/src/app_modules/event/component/detail/list_peserta.tsx b/src/app_modules/event/component/detail/list_peserta.tsx
index ab93a45d..0089b2f2 100644
--- a/src/app_modules/event/component/detail/list_peserta.tsx
+++ b/src/app_modules/event/component/detail/list_peserta.tsx
@@ -7,6 +7,7 @@ import {
Center,
Grid,
Group,
+ Loader,
Skeleton,
Stack,
Text,
@@ -31,6 +32,8 @@ import moment from "moment";
import { useShallowEffect } from "@mantine/hooks";
import { API_RouteEvent } from "@/app/lib/api_user_router/route_api_event";
import Event_ComponentSkeletonListPeserta from "../skeleton/comp_skeleton_list_peserta";
+import { ScrollOnly } from "next-scroll-loader";
+import { event_newGetListPesertaById } from "../../fun";
export default function ComponentEvent_ListPeserta({
total,
@@ -43,6 +46,7 @@ export default function ComponentEvent_ListPeserta({
}) {
const router = useRouter();
const [data, setData] = useState(null);
+ const [activePage, setActivePage] = useState(1);
useShallowEffect(() => {
onLoadPeserta();
@@ -80,22 +84,53 @@ export default function ComponentEvent_ListPeserta({
) : (
-
- {data.map((e, i) => (
-
-
+ //
+ // {data.map((e, i) => (
+ //
+ //
- {/* */}
-
- ))}
-
+ // {/* */}
+ //
+ // ))}
+ //
+ (
+
+
+
+ )}
+ data={data}
+ setData={setData as any}
+ moreData={async () => {
+ const loadData = await event_newGetListPesertaById({
+ eventId: eventId as string,
+ page: activePage + 1,
+ });
+
+ setActivePage((val) => val + 1);
+
+ return loadData;
+ }}
+ >
+ {(item) => (
+
+ )}
+
)}
@@ -139,7 +174,6 @@ function ComponentEvent_AvatarAndUsername({
const tglMulai = moment(tanggalMulai).diff(moment(), "minutes") < 0;
-
return (
<>
@@ -180,7 +214,11 @@ function ComponentEvent_AvatarAndUsername({
- {isPresent ? Hadir : -}
+ {isPresent ? (
+ Hadir
+ ) : (
+ -
+ )}
diff --git a/src/app_modules/forum/splash/index.tsx b/src/app_modules/forum/splash/index.tsx
index 205abb33..49d9eda6 100644
--- a/src/app_modules/forum/splash/index.tsx
+++ b/src/app_modules/forum/splash/index.tsx
@@ -11,7 +11,7 @@ export default function Forum_Splash() {
useShallowEffect(() => {
setTimeout(() => {
router.replace(RouterForum.beranda, { scroll: false });
- }, 1000);
+ }, 500);
}, []);
return (
diff --git a/src/app_modules/katalog/profile/_component/button/comp_create_new_profile.tsx b/src/app_modules/katalog/profile/_component/button/comp_create_new_profile.tsx
index cd7b5204..2ac6621b 100644
--- a/src/app_modules/katalog/profile/_component/button/comp_create_new_profile.tsx
+++ b/src/app_modules/katalog/profile/_component/button/comp_create_new_profile.tsx
@@ -54,6 +54,7 @@ export function Profile_ComponentCreateNewProfile({
file: filePP,
dirId: DIRECTORY_ID.profile_foto,
});
+ // console.log("ini foto", uploadPhoto);
if (!uploadPhoto.success) {
setLoading(false);
return ComponentGlobal_NotifikasiPeringatan(
@@ -61,29 +62,36 @@ export function Profile_ComponentCreateNewProfile({
);
}
- const uploadBackground = await funGlobal_UploadToStorage({
- file: fileBG,
- dirId: DIRECTORY_ID.profile_background,
- });
- if (!uploadBackground.success) {
- setLoading(false);
- return ComponentGlobal_NotifikasiPeringatan(
- "Gagal upload background profile"
- );
- }
+ if (uploadPhoto.success) {
+ const uploadBackground = await funGlobal_UploadToStorage({
+ file: fileBG,
+ dirId: DIRECTORY_ID.profile_background,
+ });
+ // console.log("ini background", uploadBackground);
+ if (!uploadBackground.success) {
+ setLoading(false);
+ return ComponentGlobal_NotifikasiPeringatan(
+ "Gagal upload background profile"
+ );
+ }
- const create = await funCreateNewProfile({
- data: newData as any,
- imageId: uploadPhoto.data.id,
- imageBackgroundId: uploadBackground.data.id,
- });
-
- if (create.status === 201) {
- ComponentGlobal_NotifikasiBerhasil("Berhasil membuat profile", 3000);
- router.push(RouterHome.main_home, { scroll: false });
- } else {
- ComponentGlobal_NotifikasiGagal(create.message);
- setLoading(false);
+ if (uploadBackground.success) {
+ const create = await funCreateNewProfile({
+ data: newData as any,
+ imageId: uploadPhoto.data.id,
+ imageBackgroundId: uploadBackground.data.id,
+ });
+ if (create.status === 201) {
+ ComponentGlobal_NotifikasiBerhasil(
+ "Berhasil membuat profile",
+ 3000
+ );
+ router.push(RouterHome.main_home, { scroll: false });
+ } else {
+ ComponentGlobal_NotifikasiGagal(create.message);
+ setLoading(false);
+ }
+ }
}
} catch (error) {
console.log(error);
diff --git a/src/app_modules/map/ui/ui_splash.tsx b/src/app_modules/map/ui/ui_splash.tsx
index d945b96c..607f58b8 100644
--- a/src/app_modules/map/ui/ui_splash.tsx
+++ b/src/app_modules/map/ui/ui_splash.tsx
@@ -11,7 +11,7 @@ export function UiMap_SplashView() {
useShallowEffect(() => {
setTimeout(() => {
- router.replace(RouterMap.main_view, { scroll: false }), 1000;
+ router.replace(RouterMap.main_view, { scroll: false }), 500;
});
}, []);
return (
diff --git a/src/app_modules/vote/splash/index.tsx b/src/app_modules/vote/splash/index.tsx
index 17a90c19..5a348b18 100644
--- a/src/app_modules/vote/splash/index.tsx
+++ b/src/app_modules/vote/splash/index.tsx
@@ -24,7 +24,7 @@ export default function Vote_Splash() {
setTabsStatus("Publish");
setTabsRiwayat("Semua");
router.replace(RouterVote.beranda);
- }, 1000);
+ }, 500);
}, []);
return (