|
|
|
@ -1,9 +1,11 @@
|
|
|
|
|
import React, { useEffect, useCallback, useMemo, useState, useRef } from 'react'; |
|
|
|
|
import { StatusBar } from 'react-native'; |
|
|
|
|
import { Button, IconButton, Text, Appbar, TextInput, TouchableRipple, Card, List } from 'react-native-paper'; |
|
|
|
|
import { Button, IconButton, Text, Appbar, TextInput, TouchableRipple, Card, List, useTheme } from 'react-native-paper'; |
|
|
|
|
import { StyleSheet, View, ScrollView, PermissionsAndroid, Image } from 'react-native'; |
|
|
|
|
import { colors } from '../../utils/color'; |
|
|
|
|
import { strings } from '../../utils/i18n'; |
|
|
|
|
import { store } from '../../appredux/store'; |
|
|
|
|
import { setRegister } from '../../appredux/actions'; |
|
|
|
|
import { launchCamera } from 'react-native-image-picker'; |
|
|
|
|
import { requestAccessStoragePermission } from '../../utils/storage'; |
|
|
|
|
import { getCoords } from '../../utils/geolocation'; |
|
|
|
@ -14,16 +16,19 @@ import ImageMarker, { Position, TextBackgroundType } from 'react-native-image-ma
|
|
|
|
|
import DateTimePicker from '@react-native-community/datetimepicker'; |
|
|
|
|
import moment from 'moment'; |
|
|
|
|
import uuid from 'react-native-uuid'; |
|
|
|
|
import Toast from 'react-native-toast-message'; |
|
|
|
|
import RequestModule |
|
|
|
|
from '../../services/api/request'; |
|
|
|
|
import { PATH_ID } from '../../config/imageFolder'; |
|
|
|
|
import { useSelector } from 'react-redux'; |
|
|
|
|
export default function DialogForm() { |
|
|
|
|
const theme = useTheme(); |
|
|
|
|
const isDarkTheme = theme.dark; |
|
|
|
|
const request = new RequestModule('project-charter') |
|
|
|
|
const requestAssign = new RequestModule('assign-hr-to-project') |
|
|
|
|
const requestAssign = new RequestModule('assignHR') |
|
|
|
|
const navigation = useNavigation(); |
|
|
|
|
const { user } = useSelector(state => state.userReducer) |
|
|
|
|
const [images, setImages] = useState([]); |
|
|
|
|
const [image, setImage] = useState(null); |
|
|
|
|
const [selectedImageUri, setSelectedImageUri] = useState(null); |
|
|
|
|
const bottomSheetImage = useRef(null); |
|
|
|
|
const [selectedProject, setSelectedProject] = useState(null); |
|
|
|
@ -59,10 +64,11 @@ export default function DialogForm() {
|
|
|
|
|
}, []); |
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
handleGetProjectCharter() |
|
|
|
|
handleGetAssignHR() |
|
|
|
|
if (existingAttachmentNumber === '') { |
|
|
|
|
setExistingAttachmentNumber(uuid.v4()) |
|
|
|
|
} |
|
|
|
|
handleGetProjectCharter() |
|
|
|
|
}, []) |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -70,41 +76,98 @@ export default function DialogForm() {
|
|
|
|
|
navigation.navigate('SearchPage', { dataListProjectCharters, onSelect: handleProjectSelect }); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const handleGetAssignHR = async () => { |
|
|
|
|
const payload = { |
|
|
|
|
paging: { start: 0, length: 1 }, |
|
|
|
|
columns: [ |
|
|
|
|
{ name: 'user_id', logic_operator: '=', operator: 'AND', value: user?.id.toString() }, |
|
|
|
|
{ name: 'deleted_at', logic_operator: 'IS NULL', operator: 'AND' }, |
|
|
|
|
], |
|
|
|
|
orders: { columns: ['created_at', 'id'], ascending: false } |
|
|
|
|
}; |
|
|
|
|
const result = await requestAssign.getDataSearch(payload); |
|
|
|
|
if (result && result.status === 200) { |
|
|
|
|
let projectName |
|
|
|
|
if (result.data.data[0]?.project_charter_id) { |
|
|
|
|
projectName = await getProjectName(result.data.data[0]?.project_charter_id); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
setImage({ imageFile: result.data.data[0]?.attachments[0]?.url }) |
|
|
|
|
setSelectedProject({ id: result.data.data[0]?.project_charter_id, project_name: projectName || '' }); |
|
|
|
|
setShift(result.data?.data[0]?.shift) |
|
|
|
|
setPosition(result.data?.data[0]?.position) |
|
|
|
|
setExpDate(result.data?.data[0]?.created_at) |
|
|
|
|
setArea(result.data?.data[0]?.area) |
|
|
|
|
setSelectedPost(result.data?.data[0]?.pos) |
|
|
|
|
setExistingAttachmentNumber(result.data?.data[0]?.attachment_number) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const handleSendRegisterData = async () => { |
|
|
|
|
const payload = { |
|
|
|
|
project_charter_id: selectedProject.id, |
|
|
|
|
hr_id: user.id, |
|
|
|
|
Position: position, |
|
|
|
|
Area: area, |
|
|
|
|
Post: selectedPost, |
|
|
|
|
position: position, |
|
|
|
|
area: area, |
|
|
|
|
post: selectedPost, |
|
|
|
|
shift: shift, |
|
|
|
|
attachment_number: existingAttachmentNumber |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
const resultImage = await handleUploadImage([image], PATH_ID); |
|
|
|
|
const result = await requestAssign.addData(payload); |
|
|
|
|
if (result.status === 201) { |
|
|
|
|
store.dispatch(setRegister(true)); |
|
|
|
|
Toast.show({ |
|
|
|
|
type: 'success', |
|
|
|
|
text1: strings('presence.dataSentSuccessfully'), |
|
|
|
|
text1: strings('register.dataSentSuccessfully'), |
|
|
|
|
}); |
|
|
|
|
navigation.navigate('App'); |
|
|
|
|
clearForm() |
|
|
|
|
} else { |
|
|
|
|
Toast.show({ |
|
|
|
|
type: 'error', |
|
|
|
|
text1: strings('presence.failedSendDataPresence'), |
|
|
|
|
text1: strings('presence.failedSendData'), |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} catch (error) { |
|
|
|
|
console.error("Network error sending presence data:", error); |
|
|
|
|
Toast.show({ |
|
|
|
|
type: 'error', |
|
|
|
|
text1: strings('presence.errorMessage'), |
|
|
|
|
text1: strings('global.errorConnectionMsg'), |
|
|
|
|
}); |
|
|
|
|
} finally { |
|
|
|
|
setLoading(false); // Ensure setLoading is called once in the end
|
|
|
|
|
// setLoading(false); // Ensure setLoading is called once in the end
|
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const getProjectName = async (projectCharterId) => { |
|
|
|
|
const payload = { |
|
|
|
|
paging: { start: 0, length: 1 }, |
|
|
|
|
columns: [ |
|
|
|
|
{ name: 'id', logic_operator: '=', operator: 'AND', value: projectCharterId.toString() }, |
|
|
|
|
{ name: 'deleted_at', logic_operator: 'IS NULL', operator: 'AND' }, |
|
|
|
|
], |
|
|
|
|
orders: { columns: ['created_at', 'id'], ascending: false } |
|
|
|
|
}; |
|
|
|
|
const result = await request.getDataSearch(payload); |
|
|
|
|
if (result && result.status === 200 && result.data.data.length > 0) { |
|
|
|
|
return result.data.data[0].project_name; |
|
|
|
|
} |
|
|
|
|
return ''; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const clearForm = () => { |
|
|
|
|
setImage(null) |
|
|
|
|
setSelectedProject(null) |
|
|
|
|
setShift('') |
|
|
|
|
setPosition('') |
|
|
|
|
setExpDate('') |
|
|
|
|
setArea('') |
|
|
|
|
setSelectedPost('') |
|
|
|
|
setExistingAttachmentNumber('') |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const handleProjectSelect = (project) => { |
|
|
|
|
handleGetDataManPowers(project.id) |
|
|
|
@ -185,18 +248,11 @@ export default function DialogForm() {
|
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const handleSetImageUri = (uri, description) => { |
|
|
|
|
const newImage = { uri: uri, description: description || "" }; |
|
|
|
|
setImages(prevImages => [...prevImages, newImage]); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const handleDeleteImage = (index) => { |
|
|
|
|
const updatedImages = [...images]; |
|
|
|
|
updatedImages.splice(index, 1); |
|
|
|
|
setImages(updatedImages); |
|
|
|
|
const handleDeleteImage = () => { |
|
|
|
|
setImage(null); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const handleTakePicture = async () => { |
|
|
|
|
try { |
|
|
|
|
const granted = await PermissionsAndroid.request( |
|
|
|
@ -253,7 +309,7 @@ export default function DialogForm() {
|
|
|
|
|
console.log('ImagePicker Error: ', response.error); |
|
|
|
|
} else { |
|
|
|
|
if (response.assets && response.assets.length > 0) { |
|
|
|
|
setLoading(true) |
|
|
|
|
// setLoading(true)
|
|
|
|
|
try { |
|
|
|
|
getCoords(async (loc) => { |
|
|
|
|
if (loc) { |
|
|
|
@ -290,7 +346,7 @@ export default function DialogForm() {
|
|
|
|
|
|
|
|
|
|
// const tempPath = `file://${RNFS.TemporaryDirectoryPath}/prsensi/${moment().format('YYYYMMDDHHmmss')}.jpg`;
|
|
|
|
|
// await RNFS.copyFile(markedImage, tempPath);
|
|
|
|
|
|
|
|
|
|
console.log("markedImage", markedImage); |
|
|
|
|
const newImageData = { |
|
|
|
|
id: 0, |
|
|
|
|
attachment_number: existingAttachmentNumber, |
|
|
|
@ -300,27 +356,25 @@ export default function DialogForm() {
|
|
|
|
|
type: response.assets[0].type, |
|
|
|
|
name: response.assets[0].fileName |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const resultImage = await handleUploadImage([newImageData], PATH_ID); |
|
|
|
|
handleSendRegisterData(); |
|
|
|
|
setImage(newImageData); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} catch (error) { |
|
|
|
|
console.error('Error adding overlay:', error); |
|
|
|
|
setLoading(false) |
|
|
|
|
// setLoading(false)
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const renderImages = useMemo(() => images.map((image, index) => ( |
|
|
|
|
const renderImage = useMemo(() => ( |
|
|
|
|
<> |
|
|
|
|
<View key={index} style={styles.imageBlock}> |
|
|
|
|
<TouchableRipple onPress={() => { handleOpenSheetImage(image.uri) }}> |
|
|
|
|
<View style={styles.imageBlock}> |
|
|
|
|
<TouchableRipple onPress={() => handleOpenSheetImage(image?.imageFile)}> |
|
|
|
|
<View style={styles.imageContainer}> |
|
|
|
|
<Image |
|
|
|
|
source={{ uri: image.uri }} |
|
|
|
|
source={{ uri: image?.imageFile }} |
|
|
|
|
style={styles.image} |
|
|
|
|
resizeMode="cover" |
|
|
|
|
/> |
|
|
|
@ -328,11 +382,14 @@ export default function DialogForm() {
|
|
|
|
|
</TouchableRipple> |
|
|
|
|
</View> |
|
|
|
|
|
|
|
|
|
<Button icon="delete" style={{ borderRadius: 10, backgroundColor: colors.semiRed, marginHorizontal: 5, marginBottom: 10 }} textColor={colors.beanRed} mode="contained-tonal" onPress={() => handleDeleteImage(index)}> |
|
|
|
|
<Button icon="delete" style={{ borderRadius: 10, backgroundColor: colors.semiRed, marginHorizontal: 5, marginBottom: 10 }} textColor={colors.beanRed} mode="contained-tonal" onPress={handleDeleteImage}> |
|
|
|
|
{strings('global.delete')} |
|
|
|
|
</Button> |
|
|
|
|
|
|
|
|
|
</> |
|
|
|
|
)), [images]); |
|
|
|
|
), [image, handleOpenSheetImage, handleDeleteImage]); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const renderArea = useMemo(() => listArea?.manpower_planning?.info?.data.map((data, index) => ( |
|
|
|
|
<> |
|
|
|
@ -356,15 +413,15 @@ export default function DialogForm() {
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<> |
|
|
|
|
<StatusBar backgroundColor={colors.blue} barStyle='light-content' translucent={true} /> |
|
|
|
|
<Appbar.Header mode='center-aligned' style={{ backgroundColor: colors.blue, elevation: 4 }}> |
|
|
|
|
<StatusBar backgroundColor={isDarkTheme ? theme.colors.surface : theme.colors.blue} barStyle={isDarkTheme ? 'dark-content' : 'light-content'} translucent={true} /> |
|
|
|
|
<Appbar.Header mode='center-aligned' style={{ backgroundColor: isDarkTheme ? theme.colors.surface : theme.colors.blue, elevation: 4 }}> |
|
|
|
|
<Appbar.BackAction color={colors.pureWhite} onPress={() => { navigation.goBack() }} /> |
|
|
|
|
<Appbar.Content titleStyle={{ fontWeight: 'bold' }} color={colors.pureWhite} title={strings('global.register')} /> |
|
|
|
|
<Appbar.Content titleStyle={{ fontWeight: 'bold' }} color={colors.pureWhite} title={strings('register.title')} /> |
|
|
|
|
</Appbar.Header> |
|
|
|
|
<View style={{ flex: 1, backgroundColor: colors.pureWhite }}> |
|
|
|
|
<View style={{ flex: 1, backgroundColor: theme.colors.surface }}> |
|
|
|
|
<View style={styles.container}> |
|
|
|
|
|
|
|
|
|
<ScrollView style={[styles.scrollViewContainer, { backgroundColor: colors.pureWhite }]}> |
|
|
|
|
<ScrollView style={[styles.scrollViewContainer, { backgroundColor: theme.colors.surface }]}> |
|
|
|
|
<TouchableRipple onPress={handleProjectPress}> |
|
|
|
|
<TextInput |
|
|
|
|
dense={true} |
|
|
|
@ -379,49 +436,54 @@ export default function DialogForm() {
|
|
|
|
|
/> |
|
|
|
|
</TouchableRipple> |
|
|
|
|
|
|
|
|
|
<TouchableRipple rippleColor={colors.pureWhite} onPress={handleOpenSheet}> |
|
|
|
|
|
|
|
|
|
<TouchableRipple rippleColor={isDarkTheme ? theme.colors.blue : theme.colors.pureWhite} onPress={handleOpenSheetPosition}> |
|
|
|
|
<TextInput |
|
|
|
|
style={{ marginTop: 10 }} |
|
|
|
|
dense={true} |
|
|
|
|
editable={false} |
|
|
|
|
value={shift ? shift : ''} |
|
|
|
|
value={position ? position : ''} |
|
|
|
|
outlineColor={colors.amethystSmoke} |
|
|
|
|
activeOutlineColor={colors.blue} |
|
|
|
|
mode="outlined" |
|
|
|
|
label='Shift' |
|
|
|
|
placeholder='Shift' |
|
|
|
|
label='Jabatan' |
|
|
|
|
placeholder='Jabatan' |
|
|
|
|
right={<TextInput.Icon icon="chevron-down" />} |
|
|
|
|
/> |
|
|
|
|
</TouchableRipple> |
|
|
|
|
<TouchableRipple rippleColor={colors.pureWhite} onPress={handleOpenSheetPosition}> |
|
|
|
|
|
|
|
|
|
<TouchableRipple rippleColor={isDarkTheme ? theme.colors.blue : theme.colors.pureWhite} onPress={handleOpenSheet}> |
|
|
|
|
<TextInput |
|
|
|
|
style={{ marginTop: 10 }} |
|
|
|
|
dense={true} |
|
|
|
|
editable={false} |
|
|
|
|
value={position ? position : ''} |
|
|
|
|
value={shift ? shift : ''} |
|
|
|
|
outlineColor={colors.amethystSmoke} |
|
|
|
|
activeOutlineColor={colors.blue} |
|
|
|
|
mode="outlined" |
|
|
|
|
label='Jabatan' |
|
|
|
|
placeholder='Jabatan' |
|
|
|
|
label='Shift' |
|
|
|
|
placeholder='Shift' |
|
|
|
|
right={<TextInput.Icon icon="chevron-down" />} |
|
|
|
|
/> |
|
|
|
|
</TouchableRipple> |
|
|
|
|
<TouchableRipple rippleColor={colors.pureWhite} onPress={handleOpenSheetArea}> |
|
|
|
|
{position !== 'spv' && |
|
|
|
|
<TouchableRipple rippleColor={isDarkTheme ? theme.colors.blue : theme.colors.pureWhite} onPress={handleOpenSheetArea}> |
|
|
|
|
<TextInput |
|
|
|
|
style={{ marginTop: 10 }} |
|
|
|
|
dense={true} |
|
|
|
|
editable={false} |
|
|
|
|
value={area ? area : ''} |
|
|
|
|
outlineColor={colors.amethystSmoke} |
|
|
|
|
activeOutlineColor={colors.blue} |
|
|
|
|
underlineColor={theme.colors.placeholder} |
|
|
|
|
activeOutlineColor={theme.colors.blue} |
|
|
|
|
mode="outlined" |
|
|
|
|
label='Area' |
|
|
|
|
placeholder='Area' |
|
|
|
|
right={<TextInput.Icon icon="chevron-down" />} |
|
|
|
|
/> |
|
|
|
|
</TouchableRipple> |
|
|
|
|
<TouchableRipple rippleColor={colors.pureWhite} onPress={handleOpenSheetPost}> |
|
|
|
|
} |
|
|
|
|
{position !== 'Danru' && position !== 'spv' && |
|
|
|
|
<TouchableRipple rippleColor={isDarkTheme ? theme.colors.blue : theme.colors.pureWhite} onPress={handleOpenSheetPost}> |
|
|
|
|
<TextInput |
|
|
|
|
style={{ marginTop: 10 }} |
|
|
|
|
dense={true} |
|
|
|
@ -435,7 +497,8 @@ export default function DialogForm() {
|
|
|
|
|
right={<TextInput.Icon icon="chevron-down" />} |
|
|
|
|
/> |
|
|
|
|
</TouchableRipple> |
|
|
|
|
<TouchableRipple rippleColor={colors.pureWhite} onPress={showExpDatePickerFunc}> |
|
|
|
|
} |
|
|
|
|
<TouchableRipple rippleColor={isDarkTheme ? theme.colors.blue : theme.colors.pureWhite} onPress={showExpDatePickerFunc}> |
|
|
|
|
<TextInput |
|
|
|
|
style={{ marginTop: 10 }} |
|
|
|
|
dense={true} |
|
|
|
@ -448,7 +511,7 @@ export default function DialogForm() {
|
|
|
|
|
placeholder='Masa Berlaku KTA' |
|
|
|
|
/> |
|
|
|
|
</TouchableRipple> |
|
|
|
|
{renderImages} |
|
|
|
|
{image !== null && renderImage} |
|
|
|
|
</ScrollView> |
|
|
|
|
<View style={{ width: '100%', marginTop: 10, marginBottom: 5 }}> |
|
|
|
|
<Button icon="camera-plus" style={{ borderRadius: 10, backgroundColor: colors.semiBlue, paddingVertical: 5, marginHorizontal: 5, }} textColor={colors.blue} mode="contained-tonal" onPress={handleTakePicture}> |
|
|
|
@ -457,11 +520,11 @@ export default function DialogForm() {
|
|
|
|
|
</View> |
|
|
|
|
</View > |
|
|
|
|
|
|
|
|
|
<View style={styles.buttonContainer}> |
|
|
|
|
<Button mode="outlined" style={styles.button} textColor={colors.mistBlue} onPress={() => { navigation.goBack() }} > |
|
|
|
|
<View style={[styles.buttonContainer, { backgroundColor: theme.colors.surface }]}> |
|
|
|
|
<Button mode="outlined" style={styles.button} textColor={isDarkTheme ? theme.colors.blue : theme.colors.mistBlue} onPress={() => { navigation.goBack() }} > |
|
|
|
|
Kembali |
|
|
|
|
</Button> |
|
|
|
|
<Button mode="contained" style={[styles.button, { backgroundColor: colors.blue }]} onPress={() => console.log('Handle Saved')}> |
|
|
|
|
<Button mode="contained" style={[styles.button, { backgroundColor: colors.blue }]} textColor={theme.colors.pureWhite} onPress={handleSendRegisterData}> |
|
|
|
|
Simpan |
|
|
|
|
</Button> |
|
|
|
|
</View> |
|
|
|
@ -474,9 +537,14 @@ export default function DialogForm() {
|
|
|
|
|
snapPoints={['30%']} |
|
|
|
|
bottomInset={10} |
|
|
|
|
detached={true} |
|
|
|
|
style={{ marginHorizontal: 15, shadowOpacity: 10 }} |
|
|
|
|
style={{ marginHorizontal: 15, shadowOpacity: 10, }} |
|
|
|
|
> |
|
|
|
|
<BottomSheetView > |
|
|
|
|
<BottomSheetView style={{ |
|
|
|
|
backgroundColor: isDarkTheme ? theme.colors.surface : theme.colors.pureWhite, position: "absolute", top: 0, |
|
|
|
|
bottom: 0, |
|
|
|
|
right: 0, |
|
|
|
|
left: 0, |
|
|
|
|
}}> |
|
|
|
|
<TouchableRipple onPress={() => handleSelectPosition("Guard")}> |
|
|
|
|
<List.Item |
|
|
|
|
title="GUARD" |
|
|
|
@ -504,9 +572,14 @@ export default function DialogForm() {
|
|
|
|
|
snapPoints={['30%']} |
|
|
|
|
bottomInset={10} |
|
|
|
|
detached={true} |
|
|
|
|
style={{ marginHorizontal: 15, shadowOpacity: 10 }} |
|
|
|
|
style={{ marginHorizontal: 15 }} |
|
|
|
|
> |
|
|
|
|
<BottomSheetView > |
|
|
|
|
<BottomSheetView style={{ |
|
|
|
|
backgroundColor: isDarkTheme ? theme.colors.surface : theme.colors.pureWhite, position: "absolute", top: 0, |
|
|
|
|
bottom: 0, |
|
|
|
|
right: 0, |
|
|
|
|
left: 0, |
|
|
|
|
}}> |
|
|
|
|
<TouchableRipple onPress={() => handleSelectShift("pagi")}> |
|
|
|
|
<List.Item |
|
|
|
|
title="PAGI" |
|
|
|
@ -536,7 +609,12 @@ export default function DialogForm() {
|
|
|
|
|
detached={true} |
|
|
|
|
style={{ marginHorizontal: 15 }} |
|
|
|
|
> |
|
|
|
|
<BottomSheetView > |
|
|
|
|
<BottomSheetView style={{ |
|
|
|
|
backgroundColor: isDarkTheme ? theme.colors.surface : theme.colors.pureWhite, position: "absolute", top: 0, |
|
|
|
|
bottom: 0, |
|
|
|
|
right: 0, |
|
|
|
|
left: 0, |
|
|
|
|
}}> |
|
|
|
|
{renderArea} |
|
|
|
|
</BottomSheetView> |
|
|
|
|
</BottomSheetModal> |
|
|
|
@ -549,7 +627,12 @@ export default function DialogForm() {
|
|
|
|
|
detached={true} |
|
|
|
|
style={{ marginHorizontal: 15 }} |
|
|
|
|
> |
|
|
|
|
<BottomSheetView > |
|
|
|
|
<BottomSheetView style={{ |
|
|
|
|
backgroundColor: isDarkTheme ? theme.colors.surface : theme.colors.pureWhite, position: "absolute", top: 0, |
|
|
|
|
bottom: 0, |
|
|
|
|
right: 0, |
|
|
|
|
left: 0, |
|
|
|
|
}}> |
|
|
|
|
{renderPost} |
|
|
|
|
</BottomSheetView> |
|
|
|
|
</BottomSheetModal> |
|
|
|
@ -611,7 +694,6 @@ const styles = StyleSheet.create({
|
|
|
|
|
justifyContent: 'space-between', |
|
|
|
|
padding: 10, |
|
|
|
|
paddingBottom: 20, |
|
|
|
|
backgroundColor: colors.pureWhite, |
|
|
|
|
}, |
|
|
|
|
imageBlock: { |
|
|
|
|
marginTop: 10, |
|
|
|
|