added refresing of calls for active tickets

This commit is contained in:
jfrye122
2023-05-18 17:25:59 -04:00
parent 3114f2fb23
commit 05e3613db9
5 changed files with 40 additions and 25 deletions

View File

@@ -12,6 +12,7 @@ import {
} from "../../redux/employee/employee.selectors";
import { Button, Card } from "react-native-paper";
import { QUERY_ACTIVE_TIME_TICKETS } from "../../graphql/timetickets.queries";
//temp
import { useQuery } from "@apollo/client";
import ErrorDisplay from "../error-display/error-display.component";
@@ -61,7 +62,9 @@ export function ScreenTimeTicketBrowser({
const [currentSJobId, setCurrentSJobId] = useState(null);
const [loading, setLoading] = useState(false);
const [error, setError] = useState(null);
const [insertTimeTicket] = useMutation(INSERT_NEW_TIME_TICKET);
const [insertTimeTicket] = useMutation(INSERT_NEW_TIME_TICKET,{
refetchQueries: ["QUERY_ACTIVE_TIME_TICKETS"],
});
const [jobCount, setJobCount] = useState(0);
// const { error, data } = useQuery(QUERY_EMPLOYEE_BY_ID, {
// variables: { id: currentEmployee.technician.id },