Fix: version 1.2.7
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user