feat(overtime): Auszahlungs-Anträge durch Mitarbeiter (opt-in pro Firma)
Mitarbeiter beantragt Überstunden-Auszahlung, HR genehmigt/lehnt ab.
Firmen-Opt-in payout_request_enabled (Default aus - nur HR-Direktbuchung).
Saldo-Abzug erst bei Genehmigung; Reject/Cancel bucht nichts.
- Migration 0042: hours_payouts.status/decided_by/decided_at/rejection_reason
+ companies.payout_request_enabled (nur Spalten, RLS unveraendert)
- Router: POST /hr/payouts/request|{id}/approve|reject|cancel; list status-Filter;
HR-Direktbuchung bleibt (status approved)
- Frontend: PayoutRequestCard (Selbstbedienung in AbsencesPage), HR-Page
Status-Spalte + Genehmigen/Ablehnen, CompanySettings-Toggle
- 4 pytest-Cases
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,8 @@ export interface HoursPayoutCreate {
|
||||
note?: string | null
|
||||
}
|
||||
|
||||
export type PayoutStatus = 'requested' | 'approved' | 'rejected' | 'cancelled'
|
||||
|
||||
export interface HoursPayoutOut {
|
||||
id: string
|
||||
company_id: string
|
||||
@@ -15,8 +17,13 @@ export interface HoursPayoutOut {
|
||||
period_year: number | null
|
||||
period_month: number | null
|
||||
note: string | null
|
||||
status: PayoutStatus
|
||||
rejection_reason: string | null
|
||||
created_by: string
|
||||
created_by_name: string
|
||||
decided_by: string | null
|
||||
decided_by_name: string
|
||||
decided_at: string | null
|
||||
created_at: string
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user