Skip to content
Snippets Groups Projects
Commit cc89a359 authored by Esther Regina's avatar Esther Regina
Browse files

fix: fixed required password

parent 69d5d842
2 merge requests!10chore: merge develop into main,!8fix: fixed password required in update admin
...@@ -18,7 +18,7 @@ const Edit = () => { ...@@ -18,7 +18,7 @@ const Edit = () => {
} }
const body = JSON.stringify({ const body = JSON.stringify({
username, username,
password password: password || undefined
}) })
const updateQuery = await fetch("https://rpl-backend-production.up.railway.app/v1/adminkursus/update/" + router.query.id, { const updateQuery = await fetch("https://rpl-backend-production.up.railway.app/v1/adminkursus/update/" + router.query.id, {
method: "PATCH", method: "PATCH",
...@@ -79,6 +79,7 @@ const Edit = () => { ...@@ -79,6 +79,7 @@ const Edit = () => {
handleUpdate() handleUpdate()
return; return;
}}> }}>
<div className="flex flex-row align-middle justify-between"> <div className="flex flex-row align-middle justify-between">
<span className="h-min my-auto font-bold text-lg">user_id</span> <span className="h-min my-auto font-bold text-lg">user_id</span>
<input disabled value={user_id} type="tel" required className="drop-shadow-xl w-2/3 p-2 rounded-xl" /> <input disabled value={user_id} type="tel" required className="drop-shadow-xl w-2/3 p-2 rounded-xl" />
...@@ -87,13 +88,13 @@ const Edit = () => { ...@@ -87,13 +88,13 @@ const Edit = () => {
<span className="h-min my-auto font-bold text-lg">Username</span> <span className="h-min my-auto font-bold text-lg">Username</span>
<input value={username} onChange={(e) => { <input value={username} onChange={(e) => {
setusername(e.target.value) setusername(e.target.value)
}} type="text" className="drop-shadow-xl w-2/3 p-2 rounded-xl" /> }} type="text" className="drop-shadow-xl w-2/3 p-2 rounded-xl" />
</div> </div>
<div className="flex flex-row align-middle justify-between"> <div className="flex flex-row align-middle justify-between">
<span className="h-min my-auto font-bold text-lg">Password</span> <span className="h-min my-auto font-bold text-lg">Password</span>
<input value={password} onChange={(e) => { <input value={password} onChange={(e) => {
setpassword(e.target.value) setpassword(e.target.value)
}} type="password" className="drop-shadow-xl w-2/3 p-2 rounded-xl" /> }} type="password" className="drop-shadow-xl w-2/3 p-2 rounded-xl" />
</div> </div>
<input type="submit" className="bg-[#F875AA] px-8 py-3 text-xl font-bold text-white rounded-xl mx-auto" value={"Simpan"} /> <input type="submit" className="bg-[#F875AA] px-8 py-3 text-xl font-bold text-white rounded-xl mx-auto" value={"Simpan"} />
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment