From e660c5572d36800b9a8dbd4e6c9c290da3eef56b Mon Sep 17 00:00:00 2001 From: Irul24 Date: Wed, 19 Feb 2025 17:06:42 +0700 Subject: [PATCH] formCollect --- assets/icon/camorlib.png | Bin 0 -> 679 bytes assets/icon/{findmylock.png => findmyloc.png} | Bin src/component/collectscreen.tsx | 472 ++++++++++-------- src/component/mapCollectLineScreen.tsx | 2 +- src/component/mapCollectPolygonScreen.tsx | 2 +- src/component/mapCollectScreen.tsx | 2 +- 6 files changed, 280 insertions(+), 198 deletions(-) create mode 100644 assets/icon/camorlib.png rename assets/icon/{findmylock.png => findmyloc.png} (100%) diff --git a/assets/icon/camorlib.png b/assets/icon/camorlib.png new file mode 100644 index 0000000000000000000000000000000000000000..03e36130b1212068e64a2c6cb3b2762115a2f14b GIT binary patch literal 679 zcmV;Y0$BZtP)%cJagZd*Ux+?Nv0AO(V~+%-=Np)$!Ij{FBXeu@!(pa zp2cze-{%mx2CQ}k5o2hqI*~KLR%A!Wp&ctgx|qHRQuf;Ej@kFfaSXMn`_9_I!ZJjo zA4$g`Id;yvxpO|TW>PssV^ASRDAsT=@)QZG`w#q-C44KBLwq~+#^dn~qLChd2XX_dk|cQ{Qg4$=Nw(4})~>k`gwQnvpm)PgpbY6Dyn2{RaDe zsfP>fkorG6v?W*6SwP}JRI};<1dF5M%vP{=wnglObk1mSVYYhjVSAJYv<@}%YIj4_ z<`Fg$wY_Wl6=Py= zqs$?V>#F`@V#2meDzdSEq{KzH6L!w0%?nN^6-ANSY&In2lc#7qhmTnK-d0E8 z;AgQJ9sZ4e=zUc_4ePE&Z6ANi_qO^07?pJ;$JhZMX_;IHIqzhq { setAlertOffline(false); }; + const DATA = [ + { + id: 'bd7acbea-c1b1-46c2-aed5-3ad53abb28ba', + title: 'First Item', + }, + { + id: 'bd7acbea-c1b1-46c2-aed5-3ad53abbsss28ba', + title: 'First Item', + }, + { + id: 'bd7acbea-c1b1-46c2-aed5-3ad53abbssssss28ba', + title: 'First Item', + } + + ]; + const [selectedId, setSelectedId] = useState(); + const [imagenotNull,setImagenotNull] = useState(false); + const Item = ({item, onPress, backgroundColor, textColor}:any) => ( + + {item.title} + + ); + const renderItem = ({item}:any) => { + return ( + + ); + }; return( - - Form Survey PJU - - Image - - {imgUrl.length === 0 ? currentIndex :currentIndex+1}/{imgUrl.length} - - - { - const x = e.nativeEvent.contentOffset.x; - setCurrentIndex(parseFloat((x/330).toFixed(0))); - }} - horizontal - renderItem={({item,index}) => { - return( - - ) - }} - /> - - - - + + + + + + navigation.navigate('PJU Map Collect', { screen: 'PJU Map Collect'})} style={{alignItems:'center'}}> + - {/* - Open Camera - */} - - - - - + {fixCoordinate.lat}, + {fixCoordinate.long} + + + } + id={"pjuCoordinate"} + coordinate={[fixCoordinate.long, fixCoordinate.lat]} + /> + + + + + {/* navigation.navigate('PJU Map Collect', { screen: 'PJU Map Collect'})}> + + Change Location + + */} - - - - - } - id={"pjuCoordinate"} - coordinate={[fixCoordinate.long, fixCoordinate.lat]} - /> - - - navigation.navigate('PJU Map Collect', { screen: 'PJU Map Collect'})}> - - Change Location - - - - - - Name* - { - setPJUname(text) - }} - onChange={()=> { - setPJUNameError(false) + - {pjuNameError ? Name is Required!:null} - - - - PJU Type * - ( - [setPJUTypeError(false)] - )} + + {/* Name* */} + Name + { + setPJUname(text) + }} + onChange={()=> { + setPJUNameError(false) + }} + /> + {pjuNameError ? Name is Required!:null} + + + + {/* PJU Type * */} + PJU Type + ( + [setPJUTypeError(false)] + )} + /> + {PJUTypeError ? PJU Type is Required!:null} - - - Status * - - {setCheckedStatus('Baik'); setPJUStatusError(false)}} - /> - Baik - - - {setCheckedStatus('Rusak'); setPJUStatusError(false); }} + - Rusak - - {PJUStatusError ? Status is Required!:null} - - - Information * - { - setPJUinfo(text) + + {/* Status* */} + Status + + {setCheckedStatus('Baik'); setPJUStatusError(false)}} + /> + Baik + + + {setCheckedStatus('Rusak'); setPJUStatusError(false); }} + /> + Rusak + + {PJUStatusError ? Status is Required!:null} + + { - setPJUInfoError(false) + /> + + Attachment + Lampirkan foto / gambar + { + !imagenotNull ? + setImagenotNull(true)}> + + + Klik untuk menambahkan foto / gambar + + + : + renderItem(item.index)} + keyExtractor={item => item.id} + extraData={selectedId} + /> + + } + + - {PJUInfoError ? Information is Required!:null} - - - - Installation Date - setOpen(true)} - value={String(momentDate)} + + {/* Information * */} + Information + { + setPJUinfo(text) + }} + onChange={()=> { + setPJUInfoError(false) + }} + /> + {PJUInfoError ? Information is Required!:null} + + - { - setOpen(false) - setInstallDate(survey_date) + + Installation Date + setOpen(true)} + value={String(momentDate)} + /> + { + setOpen(false) + setInstallDate(survey_date) + }} + onCancel={() => { + setOpen(false) + }} + /> + + { - setOpen(false) + /> + - - - - - -