This commit is contained in:
zadit biasa aja
2025-07-02 10:33:06 +00:00
parent cb576b3176
commit 765d90ceec
2 changed files with 28 additions and 9 deletions

View File

@@ -283,7 +283,7 @@ body {
} }
.submitButton:hover { .submitButton:hover {
background-color: var(--dark-blue); background-color: #d03b3b;
transform: translateY(-1px); transform: translateY(-1px);
box-shadow: var(--shadow-md); box-shadow: var(--shadow-md);
} }
@@ -316,9 +316,9 @@ body {
} }
.warning { .warning {
background-color: rgb(245 158 11 / 0.1); background-color: #ef444417;
color: var(--warning-amber); color: #ef4444;
border: 1px solid rgb(245 158 11 / 0.2); border: 1px solid #ef444433;
padding: 1rem; padding: 1rem;
border-radius: 0.5rem; border-radius: 0.5rem;
margin-top: 1rem; margin-top: 1rem;

View File

@@ -266,6 +266,11 @@ const CameraCanvas = () => {
setLoading(false); setLoading(false);
const data = await res.json(); const data = await res.json();
if (data.responseCode == 409) {
console.log(409);
setFileTemp({ error: 409 });
return;
}
console.log(data); console.log(data);
setFileTemp(data); setFileTemp(data);
@@ -530,7 +535,7 @@ const CameraCanvas = () => {
<div <div
style={{ style={{
padding: 10, padding: 10,
backgroundColor: "#ff6d6d", backgroundColor: "#ef4444",
borderRadius: 15, borderRadius: 15,
color: "white", color: "white",
fontWeight: "bold", fontWeight: "bold",
@@ -543,7 +548,7 @@ const CameraCanvas = () => {
<div <div
style={{ style={{
padding: 10, padding: 10,
backgroundColor: "#ff6d6d", backgroundColor: "#ef4444",
borderRadius: 15, borderRadius: 15,
color: "white", color: "white",
fontWeight: "bold", fontWeight: "bold",
@@ -567,13 +572,13 @@ const CameraCanvas = () => {
</div> </div>
) : ( ) : (
capturedImage && capturedImage &&
!fileTemp && ( (!fileTemp || fileTemp.error == undefined) && (
<div> <div>
<h4 style={{ marginTop: 0 }}>Tinjau Gambar</h4> <h4 style={{ marginTop: 0 }}>Tinjau Gambar</h4>
<div <div
style={{ style={{
padding: 10, padding: 10,
backgroundColor: "#ff6d6d", backgroundColor: "#ef4444",
borderRadius: 15, borderRadius: 15,
color: "white", color: "white",
fontWeight: "bold", fontWeight: "bold",
@@ -594,11 +599,25 @@ const CameraCanvas = () => {
</div> </div>
) )
)} )}
{fileTemp && ( {fileTemp && fileTemp.error != "409" ? (
<PaginatedFormEditable <PaginatedFormEditable
data={fileTemp} data={fileTemp}
handleSimpan={(data) => handleSaveTemp(data)} handleSimpan={(data) => handleSaveTemp(data)}
/> />
) : (
fileTemp && (
<>
<h4>KTP Sudah Terdaftar</h4>
<h4
onClick={() => {
setFileTemp(null);
setIsFreeze(false);
}}
>
Hapus
</h4>
</>
)
)} )}
</div> </div>