Fix server

This commit is contained in:
2024-09-21 10:07:26 +08:00
parent 56548b4258
commit 008bba9fe5
17 changed files with 24 additions and 15 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@@ -47,7 +47,10 @@ export default function Register({ dataOtp }: { dataOtp: any }) {
if (body.username.length < 5) return null;
if (_.values(body.username).includes(" ")) return null;
const res = await Auth_funRegister({data: body, HIPMI_PWD: GlobalEnv.value?.WIBU_PWD as string});
const res = await Auth_funRegister({
data: body,
HIPMI_PWD: GlobalEnv.value?.WIBU_PWD as string,
});
if (res.status === 200) {
await auth_funDeleteAktivasiKodeOtpById(dataOtp.id).then((val) => {
if (val.status === 200) {
@@ -70,7 +73,6 @@ export default function Register({ dataOtp }: { dataOtp: any }) {
<Stack h={"100%"} align="center" justify="center" spacing={70}>
<Title order={2} c={MainColor.yellow}>
REGISTRASI
{GlobalEnv.value?.DATABASE_URL}
</Title>
<IconUserCircle size={100} color="white" />

View File

@@ -1,8 +1,12 @@
"use client"
"use client";
import { RouterHome } from "@/app/lib/router_hipmi/router_home";
import { MainColor, AccentColor } from "@/app_modules/_global/color";
import { ComponentGlobal_NotifikasiPeringatan, ComponentGlobal_NotifikasiBerhasil, ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_global";
import {
ComponentGlobal_NotifikasiPeringatan,
ComponentGlobal_NotifikasiBerhasil,
ComponentGlobal_NotifikasiGagal,
} from "@/app_modules/_global/notif_global";
import { validRegex } from "@/app_modules/katalog/component/regular_expressions";
import { Button } from "@mantine/core";
import _ from "lodash";
@@ -55,7 +59,7 @@ export function Profile_ComponentCreateNewProfile({
if (res.status === 201) {
setLoading(true);
ComponentGlobal_NotifikasiBerhasil("Berhasil Membuat Profile", 3000);
router.push(RouterHome.main_home);
router.push(RouterHome.main_home, { scroll: false });
} else {
ComponentGlobal_NotifikasiGagal(res.message);
}
@@ -83,4 +87,4 @@ export function Profile_ComponentCreateNewProfile({
</Button>
</>
);
}
}

View File

@@ -1,9 +1,7 @@
"use client";
import {
AccentColor,
MainColor,
} from "@/app_modules/_global/color/color_pallet";
import { MainColor } from "@/app_modules/_global/color/color_pallet";
import { ComponentGlobal_BoxUploadImage } from "@/app_modules/_global/component";
import ComponentGlobal_BoxInformation from "@/app_modules/_global/component/box_information";
import ComponentGlobal_ErrorInput from "@/app_modules/_global/component/error_input";
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global/notifikasi_peringatan";
@@ -25,7 +23,6 @@ import { IconAt, IconCamera, IconUpload } from "@tabler/icons-react";
import { useState } from "react";
import { validRegex } from "../../component/regular_expressions";
import { Profile_ComponentCreateNewProfile } from "../_component";
import { ComponentGlobal_BoxUploadImage } from "@/app_modules/_global/component";
export default function CreateProfile({
userLoginId,
@@ -38,7 +35,7 @@ export default function CreateProfile({
const [imgBG, setImgBG] = useState<any | null>();
const [value, setValue] = useState({
namaBank: "",
name: "",
email: "",
alamat: "",
jenisKelamin: "",
@@ -54,7 +51,6 @@ export default function CreateProfile({
{imgPP ? (
<Paper shadow="lg" radius={"100%"}>
<Avatar
color={"cyan"}
sx={{
borderStyle: "solid",
@@ -126,7 +122,14 @@ export default function CreateProfile({
<ComponentGlobal_BoxInformation informasi="Upload foto latar belakang profile anda." />
<ComponentGlobal_BoxUploadImage>
{imgBG ? (
<Image alt="Foto" src={imgBG ? imgBG : "/aset/no-img.png"} />
<AspectRatio ratio={1 / 1} mah={265} mx={"auto"}>
<Image
style={{ maxHeight: 250, margin: "auto", padding: "5px" }}
alt="Foto"
height={250}
src={imgBG ? imgBG : "/aset/no-img.png"}
/>
</AspectRatio>
) : (
<Stack justify="center" align="center" h={"100%"}>
<IconUpload color="white" />
@@ -190,7 +193,7 @@ export default function CreateProfile({
onChange={(val) => {
setValue({
...value,
namaBank: val.target.value,
name: val.target.value,
});
}}
/>