From d580bab3c57f444c2f113793380ac8eb89c2e8c3 Mon Sep 17 00:00:00 2001 From: farhan048 Date: Thu, 16 Feb 2023 15:27:32 +0700 Subject: [PATCH] add kolom status_boundary --- .../SimproV2/ResourceWorker/DialogForm.js | 53 +++++++++---------- 1 file changed, 24 insertions(+), 29 deletions(-) diff --git a/src/views/SimproV2/ResourceWorker/DialogForm.js b/src/views/SimproV2/ResourceWorker/DialogForm.js index e293ea4..e198a02 100644 --- a/src/views/SimproV2/ResourceWorker/DialogForm.js +++ b/src/views/SimproV2/ResourceWorker/DialogForm.js @@ -40,7 +40,7 @@ const DialogForm = ({ openDialog, closeDialog, toggleDialog, typeDialog, dataEdi const [address, setAddress] = useState('') const [divisionId, setDivisionId] = useState('') const [statusResource, setStatusResource] = useState('active') - + const [statusRestriction, setStatusRestriction] = useState(false) useEffect(() => { if (typeDialog === "Edit" || typeDialog === "Set") { console.log("cel data Edit", dataEdit) @@ -112,8 +112,10 @@ const DialogForm = ({ openDialog, closeDialog, toggleDialog, typeDialog, dataEdi role_id: roleId, divisi_id: divisionId, address, - status_resource: statusResource + status_resource: statusResource, + status_boundary: statusRestriction } + console.log(data) if (birthDate && birthDate != "") { data['birth_date'] = birthDate; @@ -154,7 +156,8 @@ const DialogForm = ({ openDialog, closeDialog, toggleDialog, typeDialog, dataEdi role_id: roleId, divisi_id: divisionId, address, - status_resource: statusResource + status_resource: statusResource, + status_boundary: statusRestriction } if (birthDate && birthDate != "") { @@ -196,42 +199,30 @@ const DialogForm = ({ openDialog, closeDialog, toggleDialog, typeDialog, dataEdi const renderForm = () => { return (
+ + + * Wajib diisi. + + - - + {/* setKtpNumber(e.target.value.replace(/[^0-9]/g, ''))} placeholder={`Input NIK (KTP)...`} maxLength="16" /> */} setKtpNumber(e.target.value)} placeholder={`Input NIK (KTP)...`} maxLength="16" /> - + setResourceName(e.target.value)} placeholder={`Input resource name...`} /> - {/* {typeDialog === 'Save' && - - - - - setPassword(e.target.value)} placeholder={`Password...`} /> - - - - - - setRetryPassword(e.target.value)} placeholder={`Retry password...`} /> - - - - } */} - + setRoleId(val)} placeholder="Select Role" style={{ width: '100%' }}> {setupSelectRole()} @@ -290,11 +281,7 @@ const DialogForm = ({ openDialog, closeDialog, toggleDialog, typeDialog, dataEdi - - {/* */} + @@ -310,12 +297,20 @@ const DialogForm = ({ openDialog, closeDialog, toggleDialog, typeDialog, dataEdi + + + + setAddress(e.target.value)} placeholder="Input address..." /> +
)