Refactor to using RNP & UI Updates.
This commit is contained in:
@@ -4,8 +4,7 @@ import React, { useRef } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Animated } from "react-native";
|
||||
import { TouchableOpacity } from "react-native-gesture-handler";
|
||||
import Swipeable from "react-native-gesture-handler/Swipeable";
|
||||
import { List } from "react-native-paper";
|
||||
import { Button, List, Title } from "react-native-paper";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||
@@ -60,21 +59,35 @@ export function JobListItem({ setCameraJob, setCameraJobId, item }) {
|
||||
};
|
||||
|
||||
return (
|
||||
<Swipeable
|
||||
ref={_swipeableRow}
|
||||
renderRightActions={RenderRightAction}
|
||||
shouldCancelWhenOutside
|
||||
>
|
||||
<TouchableOpacity onPress={onPress}>
|
||||
<List.Item
|
||||
onPress={onPress}
|
||||
title={item.ro_number || t("general.labels.na")}
|
||||
title={<Title>{item.ro_number || t("general.labels.na")}</Title>}
|
||||
description={`${item.ownr_fn || ""} ${item.ownr_ln || ""} ${
|
||||
item.ownr_co_nm || ""
|
||||
} - ${item.v_model_yr || ""} ${item.v_make_desc || ""} ${
|
||||
item.v_model_desc || ""
|
||||
}`}
|
||||
right={({ style }) => (
|
||||
<Button
|
||||
style={style}
|
||||
onPress={() => {
|
||||
logImEXEvent("imexmobile_setcamerajobid_swipe");
|
||||
setCameraJobId(item.id);
|
||||
setCameraJob(item);
|
||||
navigation.navigate("MediaBrowserTab");
|
||||
_swipeableRow.current.close();
|
||||
}}
|
||||
>
|
||||
<Ionicons
|
||||
style={style}
|
||||
name="ios-add"
|
||||
size={32}
|
||||
color="dodgerblue"
|
||||
/>
|
||||
</Button>
|
||||
)}
|
||||
/>
|
||||
</Swipeable>
|
||||
</TouchableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user