I have two collections, one is users and the other is invoice details. On user login, I need to check that the current user has filled out all fields in the invoice details collection. So need to show an alert as soon as user logs in to say to fill out details.
Both collections have the same UID's
checkJob = () => {
firebase.firestore().collection('invoice_details').where("accountname", "==", "").get().then((resultSnapShot) => {
if (resultSnapShot.size == 0) {
Alert.alert("Details need to be updated")
} else {
Alert.alert("Details ok")
}
})
}