Product Form
What this screen is for
The mobile form used to create a new product or edit an existing one: name, description, price, stock, category, active state and image. The add action on the Products screen, or tapping a product there, opens it.
When you would use this
A business owner comes to this form to add a new product to the catalogue, or to update an existing product's price, stock, category or image.
Who sees it
Only the user matching the owner field on the business document can open this screen.
Where it lives
The screen exists only on the mobile app.
What you can do here
Name and description
The product's name is required; the description is optional.
Price
Typed as a human-readable amount (comma or dot separated) and converted to minor units on save; text that cannot be parsed is refused.
Stock
Entered as a whole number; a negative value is refused.
Category
One of the business's defined categories can be chosen, or the product left uncategorised; an uncategorised product keeps appearing in the lists.
Active state
A switch makes the product active or inactive; an inactive product never appears in the customer's catalogue.
Image
The same shared image picker services and staff forms use; it shows the saved image, and a new one can be chosen or the existing one removed.
Save
The form does not proceed while a required field is invalid; if an image was chosen it uploads first, and the product document is written only once that upload succeeds.
What the server accepts and refuses
The name and the non-negative checks live only in the form
Whether the name is filled in, or the price and stock are non-negative, is checked only by this form — not by the Firestore rule that governs the write itself.
The negative-stock check is only a typo guard
The real protection sits in the order transaction — only that transaction can stop two customers buying the same last unit at once. This form's check is nothing more than a guard against stock never going negative by a typo.