added some checks for bugs

This commit is contained in:
jfrye122
2023-05-19 15:48:44 -04:00
parent 05e3613db9
commit 4dc054b1e3
6 changed files with 133 additions and 44 deletions

View File

@@ -41,9 +41,9 @@ export function TimeTicketClockOff({
route,
}) {
const navigation = useNavigation();
const { timeTicketId, handleOnDone } = route.params;
const { timeTicketId } = route.params;
// console.log("TimeTicketClockOff, timeTicketId :", timeTicketId);
console.log( "TimeTicketClockOff, handleOnDone :", handleOnDone );
// console.log( "TimeTicketClockOff, handleOnDone :", handleOnDone );
const { t } = useTranslation();
const [loading, setLoading] = useState(false);
@@ -61,6 +61,12 @@ export function TimeTicketClockOff({
!!values.productivehours &&
!!currentSCC?.value
) {
if (isNaN(values.actualhours)|isNaN(values.productivehours)) {
console.log("actual hours is NAN!");
setError({ message: "Please make sure all fields have valid values." });
return;
}
setError(null);
console.log("all have values:");
} else {