Add working call for clock in to timeticketbrowser

This commit is contained in:
jfrye122
2023-05-16 13:49:28 -04:00
parent 9132c1bb9b
commit e950fd9fd7
5 changed files with 124 additions and 146 deletions

View File

@@ -23,6 +23,8 @@ const mapStateToProps = createStructuredSelector({
// });
export function EmployeeClockedInList({ technician }) {
console.info("EmployeeClockedInList, QUERY_ACTIVE_TIME_TICKETS called.");
const { t } = useTranslation();
const { loading, error, data, refetch } = useQuery(
@@ -39,15 +41,12 @@ export function EmployeeClockedInList({ technician }) {
if (loading) return <ActivityIndicator color="dodgerblue" size="large" />;
if (error) return <ErrorDisplay errorMessage={error.message} />;
console.log("EmployeeClockedInList, QUERY_ACTIVE_TIME_TICKETS data:", data);
// if (data) () => {setTmTicketJobId(data)}
const onRefresh = async () => {
return refetch();
};
return (
<View>
<View style={{ flex:1, flexGrow:1 }} >
{data.timetickets.length > 0 ? (
<View>
<Text style={{ paddingLeft: 12, paddingTop: 14 }}>