Fix: version 1.2.7
This commit is contained in:
@@ -15,7 +15,7 @@ export default async function Layout({
|
||||
const activationUser = await funGlobal_checkActivationUseById({
|
||||
userId: userLoginId as string,
|
||||
});
|
||||
console.log(activationUser, "ini di layout");
|
||||
|
||||
if (activationUser == false) return redirect("/waiting-room");
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
import { redirect } from "next/navigation";
|
||||
import versionUpdate from "../../package.json";
|
||||
import { SplashScreen } from "@/app_modules/auth";
|
||||
import { useShallowEffect } from "@mantine/hooks";
|
||||
|
||||
export default async function Page() {
|
||||
const version = versionUpdate.version;
|
||||
export default function Page() {
|
||||
// useShallowEffect(() => {
|
||||
// setTimeout(() => {
|
||||
// window.location.replace("/dev/home");
|
||||
// }, 100);
|
||||
// }, []);
|
||||
|
||||
// return <Login version={version} />;
|
||||
return redirect("/dev/home");
|
||||
// return <PageSplash />;
|
||||
// return <div>spash</div>;
|
||||
return <SplashScreen />;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
"use client";
|
||||
|
||||
import { RouterAdminEvent } from "@/app/lib/router_admin/router_admin_event";
|
||||
import { MODEL_EVENT } from "@/app_modules/event/model/interface";
|
||||
import {
|
||||
MODEL_EVENT
|
||||
} from "@/app_modules/event/model/interface";
|
||||
import {
|
||||
Box,
|
||||
Button,
|
||||
Center,
|
||||
Group,
|
||||
@@ -16,7 +15,7 @@ import {
|
||||
Table,
|
||||
Text,
|
||||
TextInput,
|
||||
Title
|
||||
Title,
|
||||
} from "@mantine/core";
|
||||
import { IconCircleCheck, IconSearch } from "@tabler/icons-react";
|
||||
import _ from "lodash";
|
||||
@@ -24,6 +23,7 @@ import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import ComponentAdminGlobal_HeaderTamplate from "../../_admin_global/header_tamplate";
|
||||
import { adminEvent_funGetListPublish } from "../fun";
|
||||
import QRCode from "react-qr-code";
|
||||
|
||||
export default function AdminEvent_TablePublish({
|
||||
listPublish,
|
||||
@@ -78,6 +78,11 @@ function TableStatus({ listPublish }: { listPublish: any }) {
|
||||
) : (
|
||||
data.map((e, i) => (
|
||||
<tr key={i}>
|
||||
<td>
|
||||
<Center w={200}>
|
||||
<QRCode style={{ height: 50, width: 50 }} value={e.id} />
|
||||
</Center>
|
||||
</td>
|
||||
<td>
|
||||
<Center w={200}>
|
||||
<Text>{e?.Author?.username}</Text>
|
||||
@@ -198,6 +203,10 @@ function TableStatus({ listPublish }: { listPublish: any }) {
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<Center>QR Code</Center>
|
||||
</th>
|
||||
|
||||
<th>
|
||||
<Center>Username</Center>
|
||||
</th>
|
||||
@@ -216,6 +225,7 @@ function TableStatus({ listPublish }: { listPublish: any }) {
|
||||
<th>
|
||||
<Center>Tanggal & Waktu Selesai</Center>
|
||||
</th>
|
||||
|
||||
<th>
|
||||
<Center>Deskripsi</Center>
|
||||
</th>
|
||||
|
||||
@@ -1,19 +1,11 @@
|
||||
"use client";
|
||||
|
||||
import {
|
||||
MainColor
|
||||
} from "@/app_modules/_global/color/color_pallet";
|
||||
import { MainColor } from "@/app_modules/_global/color/color_pallet";
|
||||
import ComponentGlobal_ErrorInput from "@/app_modules/_global/component/error_input";
|
||||
import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil";
|
||||
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global/notifikasi_peringatan";
|
||||
import { UIGlobal_LayoutDefault } from "@/app_modules/_global/ui";
|
||||
import {
|
||||
Button,
|
||||
Stack,
|
||||
Text,
|
||||
TextInput,
|
||||
Title
|
||||
} from "@mantine/core";
|
||||
import { Button, Stack, Text, TextInput, Title } from "@mantine/core";
|
||||
import { useFocusTrap, useShallowEffect } from "@mantine/hooks";
|
||||
import { IconUserCircle } from "@tabler/icons-react";
|
||||
import _ from "lodash";
|
||||
@@ -77,12 +69,12 @@ export default function Register() {
|
||||
ComponentGlobal_NotifikasiBerhasil(result.message);
|
||||
router.push("/waiting-room", { scroll: false });
|
||||
|
||||
const resAktivasi = await auth_funDeleteAktivasiKodeOtpByNomor({
|
||||
await auth_funDeleteAktivasiKodeOtpByNomor({
|
||||
nomor: data.nomor,
|
||||
});
|
||||
}
|
||||
|
||||
if(res.status === 400){
|
||||
if (res.status === 400) {
|
||||
setLoading(false);
|
||||
ComponentGlobal_NotifikasiPeringatan(result.message);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
"use client";
|
||||
|
||||
import { RouterAdminDashboard } from "@/app/lib/router_hipmi/router_admin";
|
||||
import { RouterAuth } from "@/app/lib/router_hipmi/router_auth";
|
||||
import { RouterHome } from "@/app/lib/router_hipmi/router_home";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { funGlobal_getUserById } from "@/app_modules/_global/fun/get/fun_get_user_by_id";
|
||||
import { MODEL_USER } from "@/app_modules/home/model/interface";
|
||||
import { Avatar, BackgroundImage, Center, Image, Stack } from "@mantine/core";
|
||||
import { useShallowEffect } from "@mantine/hooks";
|
||||
import { useRouter } from "next/navigation";
|
||||
@@ -14,39 +8,11 @@ export default function SplashScreen() {
|
||||
const router = useRouter();
|
||||
|
||||
useShallowEffect(() => {
|
||||
// if (!checkCookies) return router.push(RouterAuth.login, { scroll: false });
|
||||
// onCheckUser();
|
||||
|
||||
setTimeout(() => {
|
||||
router.push("/login", { scroll: false });
|
||||
router.push("/dev/home", { scroll: false });
|
||||
}, 1000);
|
||||
// if (!userLoginId) {
|
||||
// setTimeout(() => {
|
||||
// router.push(RouterAuth.login, { scroll: false });
|
||||
// }, 1000);
|
||||
// } else {
|
||||
// dataUser.masterUserRoleId === "1"
|
||||
// ? setTimeout(() => {
|
||||
// return router.push(RouterHome.main_home, { scroll: false });
|
||||
// }, 1000)
|
||||
// : setTimeout(() => {
|
||||
// return router.push(RouterAdminDashboard.splash_admin, {
|
||||
// scroll: false,
|
||||
// });
|
||||
// }, 1000);
|
||||
// }
|
||||
}, []);
|
||||
|
||||
// async function onCheckUser() {
|
||||
// const userLoginId = await funGetUserIdByToken();
|
||||
// const dataUser = await funGlobal_getUserById({ userId: userLoginId });
|
||||
|
||||
// if (dataUser?.masterUserRoleId == "1")
|
||||
// return router.push(RouterHome.main_home);
|
||||
|
||||
// return router.push(RouterAdminDashboard.splash_admin);
|
||||
// }
|
||||
|
||||
return (
|
||||
<>
|
||||
<BackgroundImage
|
||||
|
||||
@@ -10,8 +10,6 @@ import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_
|
||||
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global/notifikasi_peringatan";
|
||||
import { UIGlobal_LayoutDefault } from "@/app_modules/_global/ui";
|
||||
import {
|
||||
ActionIcon,
|
||||
Box,
|
||||
Button,
|
||||
Center,
|
||||
Loader,
|
||||
@@ -24,18 +22,16 @@ import { useFocusTrap, useShallowEffect } from "@mantine/hooks";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
import Validasi_SkeletonView from "./skeleton";
|
||||
import { auth_funDeleteAktivasiKodeOtpByNomor } from "../fun/fun_edit_aktivasi_kode_otp_by_id";
|
||||
import { IconChevronLeft } from "@tabler/icons-react";
|
||||
import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_global";
|
||||
import { auth_funResendCode } from "../fun";
|
||||
import { auth_funDeleteAktivasiKodeOtpByNomor } from "../fun/fun_edit_aktivasi_kode_otp_by_id";
|
||||
import Validasi_SkeletonView from "./skeleton";
|
||||
|
||||
export default function Validasi() {
|
||||
const router = useRouter();
|
||||
const [inputCode, setInputOtp] = useState("");
|
||||
const focusTrapRef = useFocusTrap();
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [counter, setCounter] = useState(7);
|
||||
const [counter, setCounter] = useState(60);
|
||||
const [loadingResend, setLoadingResend] = useState(false);
|
||||
const [triggerOtp, setTriggerOtp] = useState(false);
|
||||
|
||||
@@ -119,7 +115,7 @@ export default function Validasi() {
|
||||
router.push(RouterAdminDashboard.splash_admin, { scroll: false });
|
||||
}
|
||||
|
||||
const resAktivasi = await auth_funDeleteAktivasiKodeOtpByNomor({
|
||||
await auth_funDeleteAktivasiKodeOtpByNomor({
|
||||
nomor: data.nomor,
|
||||
});
|
||||
}
|
||||
@@ -162,7 +158,7 @@ export default function Validasi() {
|
||||
localStorage.setItem("hipmi_auth_code_id", result.kodeId);
|
||||
ComponentGlobal_NotifikasiBerhasil("Kode Berhasil Dikirim", 2000);
|
||||
setTriggerOtp(true);
|
||||
setCounter(7);
|
||||
setCounter(60);
|
||||
setLoadingResend(false);
|
||||
// router.push("/validasi", { scroll: false });
|
||||
} else {
|
||||
@@ -226,8 +222,8 @@ export default function Validasi() {
|
||||
/>
|
||||
</Center>
|
||||
|
||||
<Stack h={"5vh"} align="center" justify="center">
|
||||
<Text fs="italic" c={"white"} >
|
||||
<Stack h={"5vh"} align="center" justify="center">
|
||||
<Text fs="italic" c={"white"}>
|
||||
Tidak menerima kode ?{" "}
|
||||
{counter > 0 ? (
|
||||
<Text fw={"bold"} inherit span>
|
||||
|
||||
13
yarn.lock
13
yarn.lock
@@ -6612,6 +6612,11 @@ pvutils@^1.1.3:
|
||||
resolved "https://registry.yarnpkg.com/pvutils/-/pvutils-1.1.3.tgz#f35fc1d27e7cd3dfbd39c0826d173e806a03f5a3"
|
||||
integrity sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==
|
||||
|
||||
qr.js@0.0.0:
|
||||
version "0.0.0"
|
||||
resolved "https://registry.yarnpkg.com/qr.js/-/qr.js-0.0.0.tgz#cace86386f59a0db8050fa90d9b6b0e88a1e364f"
|
||||
integrity sha512-c4iYnWb+k2E+vYpRimHqSu575b1/wKl4XFeJGpFmrJQz5I88v9aY2czh7s0w36srfCM1sXgC/xpoJz5dJfq+OQ==
|
||||
|
||||
queue-microtask@^1.2.2:
|
||||
version "1.2.3"
|
||||
resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243"
|
||||
@@ -6768,6 +6773,14 @@ react-property@2.0.0:
|
||||
resolved "https://registry.yarnpkg.com/react-property/-/react-property-2.0.0.tgz#2156ba9d85fa4741faf1918b38efc1eae3c6a136"
|
||||
integrity sha512-kzmNjIgU32mO4mmH5+iUyrqlpFQhF8K2k7eZ4fdLSOPFrD1XgEuSBv9LDEgxRXTMBqMd8ppT0x6TIzqE5pdGdw==
|
||||
|
||||
react-qr-code@^2.0.15:
|
||||
version "2.0.15"
|
||||
resolved "https://registry.yarnpkg.com/react-qr-code/-/react-qr-code-2.0.15.tgz#fbfc12952c504bcd64275647e9d1ea63251742ce"
|
||||
integrity sha512-MkZcjEXqVKqXEIMVE0mbcGgDpkfSdd8zhuzXEl9QzYeNcw8Hq2oVIzDLWuZN2PQBwM5PWjc2S31K8Q1UbcFMfw==
|
||||
dependencies:
|
||||
prop-types "^15.8.1"
|
||||
qr.js "0.0.0"
|
||||
|
||||
react-quill@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/react-quill/-/react-quill-2.0.0.tgz#67a0100f58f96a246af240c9fa6841b363b3e017"
|
||||
|
||||
Reference in New Issue
Block a user