Ayarlar (/ayarlar)

Restaurant configuration: table areas, service charge, time format, business-day clock times, order approval mode, personnel (PIN users), stations, and reservation warn minutes. Internal tab id: settings.

Who can open it

Patron only.

Purpose

  • Configure how the floor and reports behave
  • Manage staff users (roles + PINs) via /api/staff/
  • Assign product stations (kitchen / bar) through station manager (still not a kitchen display)
  • Tune reservation warning minutes

Key files

Area Paths
Root src/components/pos/RestaurantSettings.tsx
Personnel PersonnelManager.tsx
Stations StationManager.tsx
Reservations ReservationSettings.tsx
Shell chrome SettingsDropdown.tsx (where used)
Writes POST /api/restaurant-settings/, staff CRUD, product station patches

Data & APIs

Call Role
GET/POST-style restaurant settings Persisted config consumed across POS
/api/restaurant-settings/warn/ Reservation warn
/api/staff/ Personnel CRUD
Product station patches Via products APIs

Settings query is shared into AdminPage so Masalar/Raporlar see the same source of truth.

State

  • Props from restaurant settings React Query
  • Local draft fields per subsection; save actions with toasts

UX details

  • Switches and numeric inputs with explicit save
  • Personnel management for patron/garson/barkasa PIN users
  • Station assignment affects prep routing metadata, not a separate mutfak route

Development notes

  • New settings keys need API + Staff UI + any Customer/Staff readers updated together
  • Changing business-day open/close times affects warning timers and day-bound reporting — test with Raporlar
  • Staff user edits should not lock out the last patron
  • Prefer small subsections over growing one monolithic settings file without structure
  • Log sensitive setting changes to operation logs when other admin actions do