diff --git a/components/camera-controls/camera-controls.component.jsx b/components/camera-controls/camera-controls.component.jsx index 3a70571..e015c58 100644 --- a/components/camera-controls/camera-controls.component.jsx +++ b/components/camera-controls/camera-controls.component.jsx @@ -1,103 +1,103 @@ -// src/toolbar.component.js file -import { Ionicons } from "@expo/vector-icons"; -import { Camera } from "expo-camera"; -import React from "react"; -import { - StyleSheet, - TouchableOpacity, - TouchableWithoutFeedback, - View, -} from "react-native"; +// // src/toolbar.component.js file +// import { Ionicons } from "@expo/vector-icons"; +// import { Camera } from "expo-camera"; +// import React from "react"; +// import { +// StyleSheet, +// TouchableOpacity, +// TouchableWithoutFeedback, +// View, +// } from "react-native"; -const styles = StyleSheet.create({ - alignCenter: { - flex: 1, - alignItems: "center", - justifyContent: "center", - }, - bottomToolbar: { - marginTop: "auto", - height: 100, - display: "flex", - justifyContent: "space-evenly", - alignItems: "center", - flexDirection: "row", - }, - captureBtn: { - width: 60, - height: 60, - borderWidth: 2, - borderRadius: 60, - borderColor: "#FFFFFF", - }, - captureBtnActive: { - width: 80, - height: 80, - }, - captureBtnInternal: { - width: 76, - height: 76, - borderWidth: 2, - borderRadius: 76, - backgroundColor: "red", - borderColor: "transparent", - }, -}); +// const styles = StyleSheet.create({ +// alignCenter: { +// flex: 1, +// alignItems: "center", +// justifyContent: "center", +// }, +// bottomToolbar: { +// marginTop: "auto", +// height: 100, +// display: "flex", +// justifyContent: "space-evenly", +// alignItems: "center", +// flexDirection: "row", +// }, +// captureBtn: { +// width: 60, +// height: 60, +// borderWidth: 2, +// borderRadius: 60, +// borderColor: "#FFFFFF", +// }, +// captureBtnActive: { +// width: 80, +// height: 80, +// }, +// captureBtnInternal: { +// width: 76, +// height: 76, +// borderWidth: 2, +// borderRadius: 76, +// backgroundColor: "red", +// borderColor: "transparent", +// }, +// }); -const { FlashMode: CameraFlashModes, Type: CameraTypes } = Camera.Constants; +// const { FlashMode: CameraFlashModes, Type: CameraTypes } = Camera.Constants; -export default function CameraControls({ - capturing = false, - cameraType = CameraTypes.back, - flashMode = CameraFlashModes.off, - setFlashMode, - setCameraType, - onCaptureIn, - onCaptureOut, - onLongCapture, - onShortCapture, -}) { - return ( - - - setFlashMode( - flashMode === CameraFlashModes.on - ? CameraFlashModes.off - : CameraFlashModes.on - ) - } - > - - +// export default function CameraControls({ +// capturing = false, +// cameraType = CameraTypes.back, +// flashMode = CameraFlashModes.off, +// setFlashMode, +// setCameraType, +// onCaptureIn, +// onCaptureOut, +// onLongCapture, +// onShortCapture, +// }) { +// return ( +// +// +// setFlashMode( +// flashMode === CameraFlashModes.on +// ? CameraFlashModes.off +// : CameraFlashModes.on +// ) +// } +// > +// +// - - - {capturing && } - - +// +// +// {capturing && } +// +// - - setCameraType( - cameraType === CameraTypes.back - ? CameraTypes.front - : CameraTypes.back - ) - } - > - - - - ); -} +// +// setCameraType( +// cameraType === CameraTypes.back +// ? CameraTypes.front +// : CameraTypes.back +// ) +// } +// > +// +// +// +// ); +// } diff --git a/components/job-list-item/job-list-item.component.jsx b/components/job-list-item/job-list-item.component.jsx index 46917b1..2fc019e 100644 --- a/components/job-list-item/job-list-item.component.jsx +++ b/components/job-list-item/job-list-item.component.jsx @@ -1,10 +1,9 @@ import { Ionicons } from "@expo/vector-icons"; import { useNavigation } from "@react-navigation/native"; -import * as ImagePicker from "expo-image-picker"; import { Body, H3, Icon, ListItem, Right } from "native-base"; -import React, { useEffect } from "react"; +import React from "react"; import { useTranslation } from "react-i18next"; -import { Animated, Platform, Text } from "react-native"; +import { Animated, Text } from "react-native"; import { TouchableOpacity } from "react-native-gesture-handler"; import Swipeable from "react-native-gesture-handler/Swipeable"; import { connect } from "react-redux"; @@ -24,33 +23,33 @@ export function JobListItem({ setCameraJob, setCameraJobId, item }) { const { t } = useTranslation(); const navigation = useNavigation(); - useEffect(() => { - (async () => { - if (Platform.OS !== "web") { - const { - status, - } = await ImagePicker.requestMediaLibraryPermissionsAsync(); - if (status !== "granted") { - alert("Sorry, we need camera roll permissions to make this work!"); - } - } - })(); - }, []); + // useEffect(() => { + // (async () => { + // if (Platform.OS !== "web") { + // const { + // status, + // } = await ImagePicker.requestMediaLibraryPermissionsAsync(); + // if (status !== "granted") { + // alert("Sorry, we need camera roll permissions to make this work!"); + // } + // } + // })(); + // }, []); - const pickImage = async () => { - let result = await ImagePicker.launchImageLibraryAsync({ - mediaTypes: ImagePicker.MediaTypeOptions.All, - allowsEditing: true, - aspect: [4, 3], - quality: 1, - }); + // const pickImage = async () => { + // let result = await ImagePicker.launchImageLibraryAsync({ + // mediaTypes: ImagePicker.MediaTypeOptions.All, + // allowsEditing: true, + // aspect: [4, 3], + // quality: 1, + // }); - console.log(result); + // console.log(result); - if (!result.cancelled) { - // setImage(result.uri); - } - }; + // if (!result.cancelled) { + // // setImage(result.uri); + // } + // }; const RenderRightAction = (progress, dragX) => { const scale = dragX.interpolate({ diff --git a/components/job-notes-item/job-notes-item.component.jsx b/components/job-notes-item/job-notes-item.component.jsx index c275d50..7da77a9 100644 --- a/components/job-notes-item/job-notes-item.component.jsx +++ b/components/job-notes-item/job-notes-item.component.jsx @@ -11,7 +11,7 @@ export default function NoteListItem({ item }) { {item.text} )} + {item.created_by} {DateTime.fromISO(item.created_at).toLocaleString( DateTime.DATETIME_SHORT diff --git a/components/screen-camera-roll/screen-camera-roll.component.jsx b/components/screen-camera-roll/screen-camera-roll.component.jsx deleted file mode 100644 index bcf5b97..0000000 --- a/components/screen-camera-roll/screen-camera-roll.component.jsx +++ /dev/null @@ -1,213 +0,0 @@ -import React, { Component } from "react"; -import { - ActivityIndicator, - Button, - Clipboard, - Image, - Share, - StatusBar, - StyleSheet, - Text, - TouchableOpacity, - View, -} from "react-native"; -import { Constants } from "expo"; -import * as Permissions from "expo-permissions"; -import * as ImagePicker from "expo-image-picker"; -export default class ScreenCameraRoll extends Component { - state = { - image: null, - uploading: false, - }; - - render() { - let { image } = this.state; - - return ( - - - - - Example: Upload ImagePicker result - - -