feat: Admin-Toggle für mobile Zeiterfassung
Backend:
- Company.mobile_stamping_enabled (BOOLEAN DEFAULT TRUE)
- CompanyOut + CompanyUpdate: neues Feld
- Migration 0027: companies.mobile_stamping_enabled
Frontend Desktop (CompanySettingsPage):
- Abschnitt 'Mobile-Ansicht' mit Toggle-Switch
- Speichert via PATCH /companies/me
Frontend Mobile (MobileStampScreen):
- Lädt mobile_stamping_enabled aus GET /companies/me
- Deaktiviert: Hinweis-Banner statt Buttons
('Einstempeln nicht verfügbar – bitte Kiosk/Desktop nutzen')
- Aktiviert: normales Verhalten
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -49,6 +49,9 @@ class Company(Base):
|
||||
kiosk_track_current_user: Mapped[bool] = mapped_column(Boolean, nullable=False, default=True)
|
||||
kiosk_heartbeat_interval_sec: Mapped[int] = mapped_column(Integer, nullable=False, default=30)
|
||||
|
||||
# Mobile-Konfiguration
|
||||
mobile_stamping_enabled: Mapped[bool] = mapped_column(Boolean, nullable=False, default=True)
|
||||
|
||||
# Relationships
|
||||
users: Mapped[list["User"]] = relationship("User", back_populates="company", lazy="noload")
|
||||
departments: Mapped[list["Department"]] = relationship("Department", back_populates="company", lazy="noload")
|
||||
|
||||
@@ -21,6 +21,7 @@ class CompanyOut(BaseModel):
|
||||
personnel_number_required: bool = False
|
||||
personnel_number_mode: PersonnelNumberModeT = "manual"
|
||||
personnel_number_next: int = 1
|
||||
mobile_stamping_enabled: bool = True
|
||||
|
||||
|
||||
class CompanyUpdate(BaseModel):
|
||||
@@ -30,6 +31,7 @@ class CompanyUpdate(BaseModel):
|
||||
personnel_number_required: bool | None = None
|
||||
personnel_number_mode: PersonnelNumberModeT | None = None
|
||||
personnel_number_next: int | None = Field(None, ge=1)
|
||||
mobile_stamping_enabled: bool | None = None
|
||||
|
||||
|
||||
class DepartmentOut(BaseModel):
|
||||
|
||||
Reference in New Issue
Block a user