Staff Form
What this screen is for
The form used to create a new staff member or edit an existing one: their name, photo and the services they can perform are set here. The add action on the staff list, or going to a staff member, opens here.
When you would use this
The owner comes to this form when entering a newly hired staff member's name and the services they can perform for the first time, or when one of these details (name, photo, services) on an existing staff member changes.
Who sees it
Only the user matching the owner field on the company document can open this screen; nobody else can create or edit a staff member.
Where it lives
The screen exists in both the mobile app and the web panel; both cover creating and editing and write the same staff document, but they do not carry the same fields. The panel also offers the sort number as a free numeric field and active status as a switch; the mobile form has neither — sort order is assigned automatically, and active status is changed from the list's action sheet instead.
What you can do here
Name
The staff member's name is required.
Photo
A photo can be picked, or the existing one removed; a removal request stays in effect until a new photo is picked.
Services they can perform
Which of the business's services this staff member can perform is checked off from the service list; saving with none selected is allowed — such a member simply never enters the eligible-staff search for a booking.
Sort value
A new staff member automatically gets one past the highest sort number already in use.
In the panel this number is also shown as a free numeric field and can be edited by hand; the mobile form has no such field.
Active switch
Whether the staff member is active or inactive can be changed with a switch.
Only in the panel form. The mobile form has no active control at all; on mobile this is managed from the staff list's action sheet.
Links to their hours and time off
For an existing staff member, two separate links to the hours and time-off screens are shown.
Only in the panel form — a newly created staff member has no id yet for either link to name, so it is hidden. The mobile form has no such links; the same screens are reached from the staff list's action sheet instead.
Double submission is blocked
A second submission while saving is in flight is ignored; creating a new staff member mints a different document id on every call, so without this guard, a second trigger of a save whose photo upload is still running could create a second staff member.
A mismatched edit is refused
If the staff id in the route or the stream is not in the list, the form shows a "not found" message instead of turning into a blank create form; otherwise saving would create a new document in place of the staff member the owner believes they are editing.
What the server accepts and refuses
The name and the sort number are validated only by the form
Whether the name is non-empty, or the sort number is an integer, is checked only by the forms themselves, not by the write rule.
Working hours are never written from this form
The field set this form writes never includes working hours, and the write merges rather than overwrites; editing a name or the services never erases a staff member's already-saved hours. Hours are written only from their own screen.