feat: staff and the schedule on v2; managers give staff passwords (platform-v2 step 6.11, KI-014)
- staff: PUT /api/waiters/{id}/password (set, change, or take away; 6+ chars)
so the password sign-in mode works for everyone; PUT /{id}/pin with the PIN in
the body (was in the address: reset-pin?pin= removed); PINs 4-6 digits when
adding; a password can be given when adding; has_password on staff; editing
clears emptied fields and keeps usernames unique; delete only without history
(orders, items, shifts) and never yourself
- schedule: times checked (schedule.bad_time), one person's overlapping shifts
refused (schedule.overlap, past midnight understood), everyone active can be
scheduled (the kitchen too), changes need core.staff.manage
- manager: src/pages/staff (list with search and filters, person dialog with
photo, PIN / password dialog, zones) and src/pages/schedule (by person, by
hour with opening hours, shift dialog with clash check, view settings kept in
the browser); the never-used "automatic start/close" switches dropped; v1
StaffTab and SchedulePage removed; ApprovalsPage loads with useLiveQuery
- tests: test_staff_v2.py (done-when on a paired screen), staff.test.mjs, e2e
manager.mjs (add, password, sign-in on a paired till, a shift and a clash)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -297,10 +297,17 @@
|
||||
"role_invalid": "There is no role {{role}}.",
|
||||
"avatar_type": "The photo must be a picture file.",
|
||||
"assignment_exists": "That assignment already exists.",
|
||||
"assignment_not_found": "Assignment not found."
|
||||
"assignment_not_found": "Assignment not found.",
|
||||
"pin_invalid": "A PIN is {{min}} to {{max}} digits.",
|
||||
"password_own": "Change your own password from your profile.",
|
||||
"delete_self": "You can't delete yourself.",
|
||||
"username_needed": "Every person needs a username.",
|
||||
"has_history": "{{name}} has orders or shifts on record, so they can't be deleted. Block them instead: they can't sign in, and the reports keep their name."
|
||||
},
|
||||
"schedule": {
|
||||
"shift_not_found": "Scheduled shift not found."
|
||||
"shift_not_found": "Scheduled shift not found.",
|
||||
"bad_time": "Times are written like 09:30.",
|
||||
"overlap": "{{name}} already has a shift from {{start}} to {{end}} that day."
|
||||
},
|
||||
"setup": {
|
||||
"done": "Setup is already done: a manager account exists."
|
||||
|
||||
@@ -2566,5 +2566,154 @@
|
||||
"testHint": "Hear it on a printer.",
|
||||
"test": "Test the beep"
|
||||
}
|
||||
},
|
||||
"staff": {
|
||||
"title": "Staff",
|
||||
"new": "Add a person",
|
||||
"none": "Nobody matches.",
|
||||
"search": "Search by name, username or phone…",
|
||||
"role": "Role",
|
||||
"allRoles": "All roles",
|
||||
"status": "Status",
|
||||
"anyStatus": "Active or blocked",
|
||||
"active": "Active",
|
||||
"blockedState": "Blocked",
|
||||
"groups": {
|
||||
"management_one": "{{count}} in management",
|
||||
"management_other": "{{count}} in management",
|
||||
"kitchen_one": "{{count}} in the kitchen and bar",
|
||||
"kitchen_other": "{{count}} in the kitchen and bar",
|
||||
"service_one": "{{count}} serving",
|
||||
"service_other": "{{count}} serving",
|
||||
"other_one": "{{count}} other",
|
||||
"other_other": "{{count}} others"
|
||||
},
|
||||
"pinOnly": "PIN",
|
||||
"pinAndPassword": "PIN + password",
|
||||
"signInTip": "How they can sign in: the venue's sign-in mode decides which one is asked.",
|
||||
"zones": "Zones",
|
||||
"allZones": "All zones",
|
||||
"noZones": "No zone",
|
||||
"edit": "Edit {{name}}",
|
||||
"pin": "New PIN for {{name}}",
|
||||
"password": "Password for {{name}}",
|
||||
"zonesOf": "Zones of {{name}}",
|
||||
"block": "Block {{name}}",
|
||||
"unblock": "Unblock {{name}}",
|
||||
"delete": "Delete {{name}}",
|
||||
"blocked": "{{name}} is blocked: signed out everywhere",
|
||||
"unblocked": "{{name}} can sign in again",
|
||||
"deleteTitle": "Delete {{name}}?",
|
||||
"deleteBody": "Only someone with no orders or shifts can be deleted. Anyone else is blocked instead: they can't sign in, and the reports keep their name.",
|
||||
"deleteYes": "Delete",
|
||||
"blockInstead": "Block instead",
|
||||
"deleted": "{{name}} deleted",
|
||||
"back": "Back",
|
||||
"save": "Save",
|
||||
"add": "Add",
|
||||
"newTitle": "Add a person",
|
||||
"added": "{{name}} added",
|
||||
"saved": "Saved",
|
||||
"photo": "Photo",
|
||||
"photoRemove": "Remove the photo",
|
||||
"photoSaved": "Photo saved",
|
||||
"fullName": "Full name",
|
||||
"fullNameHint": "Shown in reports.",
|
||||
"nickname": "Name in the apps",
|
||||
"nicknameHint": "What colleagues see on the phones and screens.",
|
||||
"username": "Username",
|
||||
"usernameHint": "For signing in; no spaces.",
|
||||
"roleHintNew": "Sets what they may do; adjust it later with the permissions.",
|
||||
"roleHintEdit": "Changing the role doesn't change their permissions: use the permissions button.",
|
||||
"pinLabel": "PIN",
|
||||
"pinHint": "4 to 6 digits, for the PIN pad on phones and screens.",
|
||||
"passwordLabel": "Password",
|
||||
"passwordHintNew": "Optional: only needed if the venue signs in by password. At least 6 characters.",
|
||||
"passwordHint": "At least 6 characters.",
|
||||
"phone": "Mobile",
|
||||
"email": "Email",
|
||||
"rate": "Hourly pay (€)",
|
||||
"rateHint": "For the schedule's costs. Only managers see it.",
|
||||
"language": "Language",
|
||||
"languageHint": "The apps' language for them.",
|
||||
"venueLanguage": "The venue's language",
|
||||
"note": "Note",
|
||||
"noteHint": "For the managers only.",
|
||||
"wrong": {
|
||||
"full_name": "Write their full name.",
|
||||
"nickname": "Write the name the apps show.",
|
||||
"username": "At least 2 characters, no spaces.",
|
||||
"hourly_rate": "A number, like 8,50.",
|
||||
"pin": "4 to 6 digits.",
|
||||
"password": "At least 6 characters."
|
||||
},
|
||||
"pinTitle": "New PIN for {{name}}",
|
||||
"pinBody": "They sign in with it on the phones and screens that ask for a PIN.",
|
||||
"passwordTitle": "Password for {{name}}",
|
||||
"passwordBodyNew": "With a password they can sign in where the venue asks for one (phones, screens, the manager).",
|
||||
"passwordBodyChange": "They already have a password: this replaces it. They stay signed in where they are.",
|
||||
"passwordRemove": "Remove the password",
|
||||
"again": "Again",
|
||||
"notSame": "The two don't match.",
|
||||
"pinSaved": "New PIN for {{name}}",
|
||||
"passwordSaved": "{{name}} has a new password",
|
||||
"passwordRemoved": "{{name}} signs in with a PIN only",
|
||||
"zonesBody": "Their phone and the table map only show these zones' tables.",
|
||||
"noGroups": "There are no zones yet (Management → Tables).",
|
||||
"noZonesWarn": "With no zone they see no tables.",
|
||||
"zonesSaved": "Zones of {{name}} saved"
|
||||
},
|
||||
"schedule": {
|
||||
"title": "Schedule",
|
||||
"view": "View",
|
||||
"views": {
|
||||
"people": "By person",
|
||||
"hours": "By hour"
|
||||
},
|
||||
"previous": "Previous week",
|
||||
"next": "Next week",
|
||||
"thisWeek": "This week",
|
||||
"settings": "How the schedule shows",
|
||||
"hours_one": "{{count}} hour",
|
||||
"hours_other": "{{count}} hours",
|
||||
"cost": "about {{amount}}",
|
||||
"nobody": "Nobody to schedule yet: add people in Staff.",
|
||||
"person": "Person",
|
||||
"addFor": "Add a shift for {{name}}",
|
||||
"addOn": "Add a shift on {{day}}",
|
||||
"state": {
|
||||
"planned": "Planned",
|
||||
"working": "Working now",
|
||||
"worked": "Worked"
|
||||
},
|
||||
"legend": {
|
||||
"planned": "Planned, not started",
|
||||
"working": "Started (working now)",
|
||||
"worked": "Worked"
|
||||
},
|
||||
"newTitle": "New shift",
|
||||
"editTitle": "Shift",
|
||||
"from": "From",
|
||||
"to": "To",
|
||||
"overnight": "ends the next day",
|
||||
"clash": "They already have a shift {{start}}–{{end}} that day.",
|
||||
"note": "Note",
|
||||
"notePh": "e.g. evening only",
|
||||
"add": "Add",
|
||||
"save": "Save",
|
||||
"back": "Back",
|
||||
"delete": "Delete",
|
||||
"added": "Shift added",
|
||||
"saved": "Shift saved",
|
||||
"deleted": "Shift deleted",
|
||||
"settingsHint": "Only on this computer; the schedule stays the same for everyone.",
|
||||
"firstDay": "The week starts on",
|
||||
"monday": "Monday",
|
||||
"sunday": "Sunday",
|
||||
"firstHour": "The timeline starts at",
|
||||
"firstHourHint": "For the \"By hour\" view.",
|
||||
"opens": "Opens",
|
||||
"closes": "Closes",
|
||||
"openingHint": "Shaded on the timeline."
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user