diff --git a/components/job-documents/job-documents.component.jsx b/components/job-documents/job-documents.component.jsx index 34f7c82..e81218e 100644 --- a/components/job-documents/job-documents.component.jsx +++ b/components/job-documents/job-documents.component.jsx @@ -1,4 +1,4 @@ -import { Container, Content, Thumbnail } from "native-base"; +import { Thumbnail } from "native-base"; import React, { useState } from "react"; import { FlatList, @@ -6,6 +6,7 @@ import { StyleSheet, Text, TouchableOpacity, + View, } from "react-native"; import MediaCacheOverlay from "../media-cache-overlay/media-cache-overlay.component"; @@ -20,46 +21,41 @@ export default function JobDocumentsComponent({ job, loading, refetch }) { return refetch(); }; return ( - - + } - > - item.id} - numColumns={4} - renderItem={(object) => ( - { - // setImgIndex(object.index); - // setPreviewVisible(true); + data={job.documents} + contentContainerStyle={styles.listContentContainer} + keyExtractor={(item) => item.id} + numColumns={4} + renderItem={(object) => ( + { + // setImgIndex(object.index); + // setPreviewVisible(true); + }} + > + - - - )} - /> - {job.documents.length} - - - + /> + + )} + /> + {job.documents.length} + + ); } diff --git a/components/job-lines/job-lines.component.jsx b/components/job-lines/job-lines.component.jsx index c16f7ee..7922a3e 100644 --- a/components/job-lines/job-lines.component.jsx +++ b/components/job-lines/job-lines.component.jsx @@ -1,11 +1,12 @@ -import { Card, CardItem, Container, Content, Text } from "native-base"; +import Dinero from "dinero.js"; +import { Card, CardItem, 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"; +import { FlatList, RefreshControl, StyleSheet, View } from "react-native"; export default function JobLines({ job, loading, refetch }) { const { t } = useTranslation(); + if (!job) { Job is not defined. @@ -16,49 +17,44 @@ export default function JobLines({ job, loading, 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}`)} - - )} + contentContainerStyle={localStyles.listContentContainer} + keyExtractor={(item) => item.id} + renderItem={(object) => ( + + + {`${ + object.item.line_desc + }${ + object.item.part_qty > 1 ? ` x ${object.item.part_qty}` : "" + }`} + {object.item.part_type && ( - {Dinero({ - amount: Math.round((object.item.act_price || 0) * 100), - }).toFormat()} + {t(`jobdetail.part_types.${object.item.part_type}`)} - - - {object.item.mod_lbr_ty && ( - - {t(`jobdetail.lbr_types.${object.item.mod_lbr_ty}`)} - - )} - - - )} - /> - - + )} + + {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}`)} + + )} + + + )} + /> + ); }