This commit is contained in:
zadit biasa aja
2025-07-01 01:19:29 +00:00
parent 338be17938
commit 8192c014a0
2 changed files with 37 additions and 38 deletions

View File

@@ -581,32 +581,35 @@ const CameraCanvas = () => {
<style>{spinnerStyle}</style> <style>{spinnerStyle}</style>
</div> </div>
) : ( ) : (
<div> capturedImage &&
<h3 style={{ marginTop: 0 }}> !fileTemp && (
KTP {!KTPdetected && "Tidak"} Terdeteksi <div>
</h3> <h3 style={{ marginTop: 0 }}>
<div KTP {!KTPdetected && "Tidak"} Terdeteksi
style={{ </h3>
padding: 10, <div
backgroundColor: "#ff6d6d", style={{
borderRadius: 15, padding: 10,
color: "white", backgroundColor: "#ff6d6d",
fontWeight: "bold", borderRadius: 15,
}} color: "white",
onClick={() => ReadImage(capturedImage)} fontWeight: "bold",
> }}
{!KTPdetected && "Tetap"} Simpan onClick={() => ReadImage(capturedImage)}
</div> >
{!KTPdetected && "Tetap"} Simpan
</div>
<h4 <h4
onClick={() => { onClick={() => {
setFileTemp(null); setFileTemp(null);
setIsFreeze(false); setIsFreeze(false);
}} }}
> >
Hapus Hapus
</h4> </h4>
</div> </div>
)
)} )}
{fileTemp && <PaginatedFormEditable data={fileTemp} />} {fileTemp && <PaginatedFormEditable data={fileTemp} />}
</div> </div>

View File

@@ -36,20 +36,16 @@ const PaginatedFormEditable = ({ data }) => {
const currentFields = fields.slice(startIndex, startIndex + fieldsPerPage); const currentFields = fields.slice(startIndex, startIndex + fieldsPerPage);
return ( return (
<div <div>
style={{
maxWidth: 400,
margin: "auto",
padding: 20,
border: "1px solid #ccc",
borderRadius: 10,
}}
>
<h3>Edit Form Data</h3>
{currentFields.map((key) => ( {currentFields.map((key) => (
<div key={key} style={{ marginBottom: 10 }}> <div key={key} style={{ marginBottom: 10, textAlign: "left" }}>
<label style={{ fontWeight: "bold", textTransform: "capitalize" }}> <label
style={{
fontWeight: "bold",
textTransform: "capitalize",
textAlign: "left",
}}
>
{key} {key}
</label> </label>
<input <input