38 lines
859 B
JavaScript
38 lines
859 B
JavaScript
import Dinero from "dinero.js";
|
|
import {
|
|
Card,
|
|
CardItem,
|
|
H3,
|
|
Text,
|
|
View,
|
|
Container,
|
|
Content,
|
|
} from "native-base";
|
|
import React from "react";
|
|
import { StyleSheet, RefreshControl, FlatList } from "react-native";
|
|
import JobNotesItem from "../job-notes-item/job-notes-item.component";
|
|
|
|
export default function JobNotes({ job, loading, refetch }) {
|
|
if (!!!job) {
|
|
<Card>
|
|
<Text>Job is not defined.</Text>
|
|
</Card>;
|
|
}
|
|
console.log("job.notes :>> ", job.notes);
|
|
const onRefresh = async () => {
|
|
return refetch();
|
|
};
|
|
|
|
return (
|
|
<FlatList
|
|
refreshControl={
|
|
<RefreshControl refreshing={loading} onRefresh={onRefresh} />
|
|
}
|
|
style={{ flex: 1 }}
|
|
data={job.notes}
|
|
renderItem={(object) => <JobNotesItem item={object.item} />}
|
|
//ItemSeparatorComponent={FlatListItemSeparator}
|
|
/>
|
|
);
|
|
}
|