feat : update otp
This commit is contained in:
@@ -50,7 +50,8 @@ function ViewLogin() {
|
||||
const code = Math.floor(Math.random() * 1000) + 1000
|
||||
setLoading(true)
|
||||
|
||||
const res = await fetch(`https://wa.wibudev.com/code?nom=${cekLogin.phone}&text=${code}`).then(
|
||||
const res = await fetch(`https://wa.wibudev.com/code?nom=${cekLogin.phone}&text=*DARMASABA*%0A%0A
|
||||
JANGAN BERIKAN KODE RAHASIA ini kepada siapa pun TERMASUK PIHAK DARMASABA. Masukkan otentikasi: *${encodeURIComponent(code)}*`).then(
|
||||
async (res) => {
|
||||
if (res.status == 200) {
|
||||
setValPhone(cekLogin.phone)
|
||||
|
||||
@@ -16,7 +16,8 @@ export default function ViewVerification({ phone, otp, user }: IVerification) {
|
||||
async function onResend() {
|
||||
const code = Math.floor(Math.random() * 1000) + 1000
|
||||
|
||||
const res = await fetch(`https://wa.wibudev.com/code?nom=${phone}&text=${code}`)
|
||||
const res = await fetch(`https://wa.wibudev.com/code?nom=${phone}&text=*DARMASABA*%0A%0A
|
||||
JANGAN BERIKAN KODE RAHASIA ini kepada siapa pun TERMASUK PIHAK DARMASABA. Masukkan otentikasi: *${encodeURIComponent(code)}*`)
|
||||
.then(
|
||||
async (res) => {
|
||||
if (res.status == 200) {
|
||||
@@ -43,7 +44,7 @@ export default function ViewVerification({ phone, otp, user }: IVerification) {
|
||||
toast.error(setCookies.message)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
setLoading(false)
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { WARNA } from "@/module/_global";
|
||||
import LayoutModal from "@/module/_global/layout/layout_modal";
|
||||
import { funGetAllGroup, IDataGroup } from "@/module/group";
|
||||
import { Box, Button, Select, Stack, TextInput } from "@mantine/core";
|
||||
import { Box, Button, Select, Stack, Text, TextInput } from "@mantine/core";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useEffect, useState } from "react";
|
||||
import toast from "react-hot-toast";
|
||||
@@ -343,7 +343,8 @@ export default function CreateMember() {
|
||||
size="md"
|
||||
type="number"
|
||||
radius={30}
|
||||
placeholder="+62...."
|
||||
placeholder="87701795778"
|
||||
leftSection={<Text>+62</Text>}
|
||||
withAsterisk
|
||||
label="Nomor Telepon"
|
||||
w={"100%"}
|
||||
@@ -357,7 +358,7 @@ export default function CreateMember() {
|
||||
onChange={(event: any) => {
|
||||
setListData({
|
||||
...listData,
|
||||
phone: event.target.value,
|
||||
phone: "62" + event.target.value,
|
||||
})
|
||||
setTouched({ ...touched, phone: false })
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import { WARNA } from "@/module/_global";
|
||||
import LayoutModal from "@/module/_global/layout/layout_modal";
|
||||
import { funGetAllGroup, IDataGroup } from "@/module/group";
|
||||
import { funGetAllPosition } from "@/module/position/lib/api_position";
|
||||
import { Box, Button, Select, Stack, TextInput } from "@mantine/core";
|
||||
import { Box, Button, Select, Stack, Text, TextInput } from "@mantine/core";
|
||||
import { useShallowEffect } from "@mantine/hooks";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
@@ -299,7 +299,7 @@ export default function EditMember({ id }: { id: string }) {
|
||||
}
|
||||
/>
|
||||
<TextInput
|
||||
size="md" type="number" radius={30} placeholder="+62...." withAsterisk label="Nomor Telepon" w={"100%"}
|
||||
size="md" type="number" radius={30} withAsterisk label="Nomor Telepon" w={"100%"}
|
||||
styles={{
|
||||
input: {
|
||||
color: WARNA.biruTua,
|
||||
@@ -307,8 +307,9 @@ export default function EditMember({ id }: { id: string }) {
|
||||
borderColor: WARNA.biruTua,
|
||||
},
|
||||
}}
|
||||
placeholder="6287701795778"
|
||||
onChange={(e) => {
|
||||
setData({ ...data, phone: e.target.value })
|
||||
setData({ ...data, phone: e.target.value })
|
||||
setTouched({ ...touched, phone: false })
|
||||
}}
|
||||
value={data.phone}
|
||||
|
||||
Reference in New Issue
Block a user