added refresing of calls for active tickets
This commit is contained in:
@@ -22,6 +22,7 @@ import axios from "axios";
|
||||
import { useNavigation } from "@react-navigation/native";
|
||||
// import { selectCurrentTimeTicketJobId } from "../../redux/timetickets/timetickets.selectors";
|
||||
|
||||
import { QUERY_ACTIVE_TIME_TICKETS } from "../../graphql/timetickets.queries";
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
currentEmployee: selectCurrentEmployee,
|
||||
currentRatesNCostCenters: selectRates,
|
||||
@@ -40,20 +41,20 @@ export function TimeTicketClockOff({
|
||||
route,
|
||||
}) {
|
||||
const navigation = useNavigation();
|
||||
const { timeTicketId } = route.params;
|
||||
const { timeTicketId, handleOnDone } = route.params;
|
||||
// console.log("TimeTicketClockOff, timeTicketId :", timeTicketId);
|
||||
// console.log( "TimeTicketClockOff, currentTmTicketJobId :", currentTmTicketJobId );
|
||||
console.log( "TimeTicketClockOff, handleOnDone :", handleOnDone );
|
||||
|
||||
const { t } = useTranslation();
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [error, setError] = useState(null);
|
||||
const [currentSCC, setCurrentSCC] = useState(null);
|
||||
|
||||
const [updateTimeticket] = useMutation(UPDATE_TIME_TICKET);
|
||||
const [updateTimeticket] = useMutation(UPDATE_TIME_TICKET,
|
||||
{refetchQueries: ["QUERY_ACTIVE_TIME_TICKETS"]});
|
||||
|
||||
const handleFinish = async (values) => {
|
||||
logImEXEvent("TimeTicketClockOff_handleFinish");
|
||||
// console.log("TimeTicketClockOff, values.cost_center?.value :", currentSCC);
|
||||
|
||||
if (
|
||||
!!values.actualhours &&
|
||||
|
||||
Reference in New Issue
Block a user