Improved uploads & handling for temp jobs. IO-399 IO-398 IO-69

This commit is contained in:
Patrick Fic
2021-02-11 15:38:59 -08:00
parent 519e7a347a
commit 3231097b29
13 changed files with 441 additions and 173 deletions

View File

@@ -64,7 +64,7 @@ export function JobListItem({ setCameraJob, setCameraJobId, item }) {
onPress={() => {
setCameraJobId(item.id);
setCameraJob(item);
navigation.navigate("CameraTab");
navigation.navigate("MediaBrowserTab");
}}
>
<Animated.View
@@ -80,36 +80,36 @@ export function JobListItem({ setCameraJob, setCameraJobId, item }) {
</TouchableOpacity>
);
};
const RenderLeftAction = (progress, dragX) => {
const scale = dragX.interpolate({
inputRange: [0, 100],
outputRange: [0, 1],
extrapolate: "clamp",
});
// const RenderLeftAction = (progress, dragX) => {
// const scale = dragX.interpolate({
// inputRange: [0, 100],
// outputRange: [0, 1],
// extrapolate: "clamp",
// });
return (
<TouchableOpacity
style={[styles.swipe_view, styles.swipe_view_blue]}
onPress={() => {
setCameraJobId(item.id);
setCameraJob(item);
navigation.push("MediaBrowser");
//pickImage(item.id);
}}
>
<Animated.Text
style={{
// color: "white",
// paddingHorizontal: 10,
// fontWeight: "600",
transform: [{ scale }],
}}
>
Add
</Animated.Text>
</TouchableOpacity>
);
};
// return (
// <TouchableOpacity
// style={[styles.swipe_view, styles.swipe_view_blue]}
// onPress={() => {
// setCameraJobId(item.id);
// setCameraJob(item);
// navigation.push("MediaBrowser");
// //pickImage(item.id);
// }}
// >
// <Animated.Text
// style={{
// // color: "white",
// // paddingHorizontal: 10,
// // fontWeight: "600",
// transform: [{ scale }],
// }}
// >
// Add
// </Animated.Text>
// </TouchableOpacity>
// );
// };
const onPress = () => {
navigation.push("JobDetail", {
@@ -120,7 +120,7 @@ export function JobListItem({ setCameraJob, setCameraJobId, item }) {
return (
<Swipeable
renderLeftActions={RenderLeftAction}
// renderLeftActions={RenderLeftAction}
renderRightActions={RenderRightAction}
>
<TouchableOpacity onPress={onPress}>