diff --git a/App.tsx b/App.tsx index bf5d6c7..cba21c2 100644 --- a/App.tsx +++ b/App.tsx @@ -302,7 +302,7 @@ export const Nav = () => { headerStyle: { backgroundColor: '#34A6F8', }, - headerRight: geonetLogo, + headerRight: geonetLogo2, headerTintColor: '#FFFFFF', headerShadowVisible: false, }} @@ -383,7 +383,7 @@ export const Nav = () => { fontSize:20 } }}/> - { fontSize:20 } }}/> - { const result = await launchCamera({ @@ -268,235 +270,240 @@ export default function CollectLineScreen({route,navigation}:collectLineScreenPr } catch (error) { console.log(error); } - } + }; + const renderItem = ({item,index}:any) => { + return ( + + + + ); + }; return ( - - - 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( - - ) - }} - /> - - - - - - - - - - - - - + + + + - + + - - - + { - route.params.coordinates.map((item:any,index:number)=>( - } - key={index} - id={String(index)} - coordinate={item} - draggable={false} - /> - )) - } + route.params.coordinates.map((item:any,index:number)=>( + } + key={index} + id={String(index)} + coordinate={item} + draggable={false} + /> + )) + } - navigation.navigate('PDAM Map Collect', { screen: 'PDAM Map Collect'})}> - - View - - + {/* */} + navigation.navigate('PDAM Map Collect', { screen: 'PDAM Map Collect'})}> + Change Location + - - Pipe Name* - { - setPipeName(text) - }} - onChange={()=> { - setPipeNameError(false) - }} - /> - {pipeNameError ? Name is Required!:null} + + {/* Name* */} + Pipe Name + { + setPipeName(text) + }} + onChange={()=> { + setPipeNameError(false) + }} + /> + {pipeNameError ? Pipe Name is Required!:null} - - Pipe Type * - ( - setPipeTypeError(false) - )} - /> - {pipeTyeError ? Pipe Type is Required!:null} + + {/* PJU Type * */} + PJU Type + ( + [setPipeTypeError(false)] + )} + /> + {pipeTyeError ? Pipe Type is Required!:null} - - Status * - - { - setCheckedStatus('Baik'); - setPipeStatusError(false); - }} - /> - Baik - - - { - setCheckedStatus('Rusak'); - setPipeStatusError(false); - }} - /> - Rusak - + + {/* Status* */} + Status + + {setCheckedStatus('Baik'); setPipeStatusError(false)}} + /> + Baik + + + {setCheckedStatus('Rusak'); setPipeStatusError(false); }} + /> + Rusak + + {pipeStatusError ? Status is Required!:null} - {pipeStatusError ? Status is Required!:null} - - Information * - { - setInformation(text) - }} - onChange={()=> { - setPipeInfoError(false) - }} - /> - {pipeInfoError ? Information is Required!:null} + + Information + { + setInformation(text) + }} + onChange={()=> { + setPipeInfoError(false) + }} + /> + {pipeInfoError ? Information is Required!:null} + + Installation Date + setOpen(true)} + value={String(momentDate)} + /> + { + setOpen(false) + setInstallDate(survey_date) }} + onCancel={() => { + setOpen(false) + }} + /> + + - - Installation Date - setOpen(true)} - value={String(momentDate)} - /> - { - setOpen(false) - setInstallDate(survey_date) - }} - onCancel={() => { - setOpen(false) - }} + + Attachment + Lampirkan foto / gambar + { + imgUrl.length === 0 ? + setModalAttachment(true)}> + + + Klik untuk menambahkan foto / gambar + + + : + + setModalAttachment(true)}> + + + + + } + contentContainerStyle={{flexDirection:'row',flexWrap:'wrap',columnGap:25,rowGap:10}} + data={imgUrl} + renderItem={({item,index})=>renderItem({item,index})} /> + }