import { Card, CardItem, Container, Content, Text } from "native-base";
import React from "react";
import { useTranslation } from "react-i18next";
import { FlatList, RefreshControl, StyleSheet } from "react-native";
import Dinero from "dinero.js";
export default function JobLines({ job, loading, refetch }) {
const { t } = useTranslation();
if (!!!job) {
Job is not defined.
;
}
const onRefresh = async () => {
return refetch();
};
return (
}
>
item.id}
renderItem={(object) => (
{`${
object.item.line_desc
}${
object.item.part_qty > 1 ? ` x ${object.item.part_qty}` : ""
}`}
{object.item.part_type && (
{t(`jobdetail.part_types.${object.item.part_type}`)}
)}
{Dinero({
amount: Math.round((object.item.act_price || 0) * 100),
}).toFormat()}
{object.item.mod_lbr_ty && (
{t(`jobdetail.lbr_types.${object.item.mod_lbr_ty}`)}
)}
)}
/>
);
}
const localStyles = StyleSheet.create({
listContentContainer: {
flex: 1,
},
flexRow: {
display: "flex",
flexDirection: "row",
justifyContent: "space-between",
},
sideMargins: {
marginLeft: 5,
marginRight: 5,
},
growWithEllipsis: {
flex: 1,
},
});