Hello,
I have a page in my project where users can enter their information, with a "Save" button at the bottom.
What I want to achieve seems simple, but I haven't been able to get it to work for a week…
When the user (logged in via authentication) clicks the "Save" button, the action should:
Create a new document in the "employee" collection (which I created in Firebase) if it is the first time the user fills in their information
orUpdate the existing document in the "employee" collection if the user modifies their information.
Of course, these actions must be unique to each authenticated user. I'm not sure if I have set this up correctly in parameters, and I don't fully understand the logic behind it.
Could you help me and explain how these actions should work?
Thank you very much!