added some checks for bugs
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user