diff --git a/assets/icon/camorlib.png b/assets/icon/camorlib.png
new file mode 100644
index 0000000..03e3613
Binary files /dev/null and b/assets/icon/camorlib.png differ
diff --git a/assets/icon/findmylock.png b/assets/icon/findmyloc.png
similarity index 100%
rename from assets/icon/findmylock.png
rename to assets/icon/findmyloc.png
diff --git a/src/component/collectscreen.tsx b/src/component/collectscreen.tsx
index f7d827e..cef109a 100644
--- a/src/component/collectscreen.tsx
+++ b/src/component/collectscreen.tsx
@@ -1,6 +1,6 @@
// global.Buffer = require('buffer').Buffer;
import React, { useEffect, useRef, useState, useCallback, useMemo } from 'react';
-import { Alert, Animated, Keyboard } from 'react-native';
+import { Alert, Animated, Keyboard, Pressable } from 'react-native';
import {
TextInput,
Button,
@@ -142,7 +142,7 @@ function CollectScreen({route,navigation}: collectScreenProps) {
const [pju_name, setPJUname] = useState('');
const [selectedPJUType, setselectedPJUType] = useState("");
const [pju_info, setPJUinfo] = useState('');
- const [checkedStatus, setCheckedStatus] = useState('');
+ const [checkedStatus, setCheckedStatus] = useState('Baik');
const [install_date, setInstallDate] = useState(new Date());
const momentDate = Moment(install_date).format('YYYY-MM-DD')
const [attachmentImgError, setattachmentImgError] = useState(false);
@@ -363,209 +363,288 @@ function CollectScreen({route,navigation}: collectScreenProps) {
const handleCancelAlertOffline = () => {
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)
+ />
+
-
-
-
-
-
-
+ {/*
+ 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(
+
+ )
+ }}
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+ */}
+
+
+
+
+
+
{/*
*/}
@@ -644,23 +723,26 @@ const styles = StyleSheet.create({
color: 'black'
},
input: {
- height: 40,
+ width:352,
+ height: 45,
borderWidth: 1,
padding: 10,
- borderRadius: 50,
- color: 'black'
+ borderRadius: 10,
+ color: '#6B5E5E',
+ borderColor:'#A6A6A6'
},
container: {
- flex: 1,
- backgroundColor: '#ecf0f1',
+ // flex: 1,
+ // backgroundColor: '#ecf0f1',
padding: 10,
},
mainContainer: {
flex: 1,
},
label: {
- fontSize: 21,
- color: 'black',
+ fontSize: 16,
+ fontWeight:'semibold',
+ color: '#434343',
// marginBottom: 20
},
title: {
diff --git a/src/component/mapCollectLineScreen.tsx b/src/component/mapCollectLineScreen.tsx
index 2d3308d..8f7a000 100644
--- a/src/component/mapCollectLineScreen.tsx
+++ b/src/component/mapCollectLineScreen.tsx
@@ -198,7 +198,7 @@ function MapCollectLineScreen({route,navigation}:MapCollectLineProps):React.JSX.
{/*
*/}
diff --git a/src/component/mapCollectPolygonScreen.tsx b/src/component/mapCollectPolygonScreen.tsx
index 9e04432..2b56f7e 100644
--- a/src/component/mapCollectPolygonScreen.tsx
+++ b/src/component/mapCollectPolygonScreen.tsx
@@ -218,7 +218,7 @@ function MapCollectPolygonScreen({route,navigation}:MapCollectPolygonProps):Reac
diff --git a/src/component/mapCollectScreen.tsx b/src/component/mapCollectScreen.tsx
index 19ebb92..2e068b2 100644
--- a/src/component/mapCollectScreen.tsx
+++ b/src/component/mapCollectScreen.tsx
@@ -208,7 +208,7 @@ function MapCollectScreen({route,navigation}:MapCollectProps):React.JSX.Element{
getLocation()} style={{position:'absolute',backgroundColor:'#FFFFFF',width:50,height:50,borderRadius:25,alignItems:'center',justifyContent:'center',top:'23%',left:'4%'}}>