# Schichtplanung (Shift Planning) Documentation

**Last Updated:** 2026-04-02

**Note:** This documentation has been enhanced with workflows from comprehensive helpdesk analysis. See `docs/content/helpdesk/MASTER_ANALYSIS_SUMMARY.md` for details.

## Basic Information

- **Feature Name:** Schichtplanung (Shift Planning)
- **Slug:** schichtplan
- **Status:** Available
- **Related Product Pages:**
  - **Live (canonical):** `v2/pages/product_schichtplan_neu.php` → https://www.ordio.com/schichtplan
  - **Archived (no public URL, reference only):** `v2/pages/product_shiftplan.php` (direct path → 403)

## Overview

Schichtplanung is Ordio's core shift planning feature, enabling businesses to create optimized shift schedules efficiently. The feature provides intelligent scheduling capabilities, automated shift assignment, and shift templates to reduce planning time by up to 50% while minimizing planning errors.

## Use Cases

### Restaurant Scheduling

**Scenario:** A restaurant chain with 5 locations needs to schedule kitchen and service staff for the upcoming week.

**Process:**

1. Manager accesses Schichtplan section and selects the week to plan
2. Views availability of all staff members across locations
3. Uses shift templates for recurring patterns (e.g., Friday dinner rush)
4. Assigns staff based on skills (chef, server, bartender)
5. Reviews labor costs to stay within budget
6. Publishes schedule - staff receive notifications via mobile app
7. Staff can apply for open shifts or request swaps

**Benefits:** Reduces planning time from 4 hours to 1 hour per week, ensures proper coverage during peak hours, enables staff flexibility.

### Retail Shift Planning

**Scenario:** A retail store with multiple departments needs to optimize staffing based on customer traffic patterns.

**Process:**

1. Manager views sales forecast data integrated with shift planning
2. Creates shifts for different departments (sales floor, cash register, stock room)
3. Assigns employees based on skills and availability
4. Uses live time tracking to see who's currently working
5. Adjusts schedule in real-time based on actual traffic
6. Reviews reporting to compare planned vs. actual hours

**Benefits:** Optimizes labor costs, ensures adequate coverage during busy periods, reduces overstaffing during slow times.

### Healthcare Scheduling

**Scenario:** A hospital needs to manage 24/7 nurse rotations while ensuring compliance with labor laws.

**Process:**

1. HR manager creates shifts for different departments (ICU, ER, general wards)
2. System automatically checks compliance (rest periods, maximum hours, U18 restrictions)
3. Assigns nurses based on certifications and skills
4. Handles shift swaps and change requests with approval workflow
5. Tracks availability and time-off requests
6. Generates reports for payroll and compliance documentation

**Benefits:** Ensures legal compliance, reduces scheduling errors, improves work-life balance for staff.

### Multi-Location Planning

**Scenario:** A service business with 10 locations needs centralized scheduling with location-specific flexibility.

**Process:**

1. Central manager views all locations in one workspace
2. Creates location-specific shifts with different requirements
3. Assigns employees who can work at multiple locations
4. Uses location-based reporting to compare performance
5. Delegates scheduling permissions to location managers
6. Maintains consistency while allowing local flexibility

**Benefits:** Centralized oversight, location-specific optimization, cross-location employee utilization.

### Seasonal Adjustments

**Scenario:** A hospitality business needs to scale up staffing for holiday season and scale down afterward.

**Process:**

1. Manager creates seasonal shift templates (holiday schedule, summer schedule)
2. Uses availability management to see who's available during peak times
3. Opens shifts for employee applications to fill gaps
4. Adjusts schedules based on actual demand
5. Uses reporting to analyze seasonal patterns for future planning

**Benefits:** Smooth seasonal transitions, efficient peak period staffing, cost-effective off-season scheduling.

## Target Audience

### Primary Users

**Shift Managers:**

- Daily responsibility for creating and managing schedules
- Need quick access to availability and shift assignment tools
- Require mobile access for on-the-go schedule adjustments
- Benefit from automated compliance checking and reporting

**HR Managers:**

- Oversee workforce planning across multiple locations
- Need compliance and reporting capabilities
- Manage employee availability and time-off requests
- Require integration with payroll systems

**Store Managers:**

- Create schedules for their specific location
- Need visibility into employee availability and preferences
- Require tools to handle last-minute changes
- Benefit from labor cost optimization features

### Secondary Users

**Business Owners:**

- Need high-level visibility into labor costs and scheduling efficiency
- Require reporting and analytics for strategic decisions
- Benefit from compliance assurance and risk reduction
- Use ROI tracking to measure scheduling improvements

**Operations Managers:**

- Coordinate scheduling across multiple locations or departments
- Need integration with other operational systems
- Require forecasting and optimization capabilities
- Benefit from centralized oversight and control

### Industries

**Restaurants & Hospitality:**

- High turnover, flexible scheduling needs
- Peak hour optimization critical
- Skill-based assignment (chef, server, bartender)
- Seasonal fluctuations

**Retail:**

- Customer traffic-based scheduling
- Multi-department coordination
- Part-time and full-time mix
- Holiday season scaling

**Healthcare:**

- 24/7 coverage requirements
- Compliance-critical (labor laws, certifications)
- Shift rotation management
- On-call scheduling

**Service Businesses:**

- Multi-location coordination
- Field service scheduling
- Skill and certification requirements
- Customer appointment integration

**Manufacturing & Production:**

- Multi-shift operations (day, evening, night)
- Skill-based assignment
- Production schedule alignment
- Overtime management

## Key Functionality

### Core Capabilities

- **Intelligent shift scheduling:** AI-powered suggestions for optimal shift assignments
- **Automated shift assignment:** Automatic assignment based on availability and skills
- **Shift templates:** Reusable templates for recurring schedules
- **Drag-and-drop interface:** Intuitive visual scheduling interface
- **Multi-location support:** Manage schedules across multiple locations
- **Availability management:** Track and respect employee availability
- **Shift swapping:** Enable employees to swap shifts with approval workflow

### Advanced Features

**Standorte (Locations):**

- Create and manage unlimited locations within a single workspace
- Parallel management of multiple locations
- Location-specific settings and configurations
- Cross-location employee assignment
- Location-based reporting and analytics

**Arbeitsbereiche (Work Areas):**

- Subdivide locations into specific work areas (e.g., kitchen, dining room, bar)
- Efficient employee assignment to work areas
- Work area-specific shift requirements
- Skill-based work area assignment
- Work area capacity management

**Skills Management:**

- Assign skills to employees (e.g., "Barista certified", "Food handler license", "Driver's license")
- Set skill requirements for shifts
- Automatic skill-based shift assignment suggestions
- Skill-based filtering and search
- Certification tracking and expiration alerts
- Skills are distinct from work areas (employees need both work area assignment AND required skills)
- Skills can be created, edited, renamed, and archived
- Archived skills can be restored if needed
- Skills visible in employee profiles and shift creation interface

**Verfügbarkeiten (Availability Management):**

- Employees can set general availability preferences
- Recurring availability patterns (e.g., "Available Monday-Friday 9-5")
- One-time availability changes
- Availability conflict detection
- Manager override capabilities

**Bewerbungen (Shift Applications):**

- Employees can apply for open shifts
- Shift bidding system for competitive assignments
- Application approval workflow
- Notification system for new applications
- Application history tracking

**Live Time Tracking:**

- Real-time view of who's currently working during planning
- Live clock-in/clock-out status
- Current shift duration display
- Integration with time tracking system
- Real-time schedule adjustments based on actual attendance

**Reporting & Analytics:**

- Compare planned vs. actual working hours
- Labor cost analysis and optimization
- Coverage analysis and gap identification
- Employee utilization reports
- Compliance reporting (rest periods, maximum hours)
- Export capabilities for payroll and accounting

**Lohngrenzen (Wage Limits):**

- Set wage limits per employee (e.g., Minijob limits)
- Automatic warnings when approaching limits
- Wage limit-based shift assignment suggestions
- Compliance with German wage regulations
- Integration with payroll calculations

**U18 Warnings:**

- Automatic identification of employees under 18
- Labor law compliance warnings for U18 employees
- Restricted shift assignment for U18 employees
- U18-specific reporting and documentation
- Integration with youth labor law requirements
- Maximum 8 hours per day, 40 hours per week
- Minimum 12 hours rest between shifts
- Night rest period: 20:00 - 06:00 (industry-specific)
- Prohibited work on specific holidays (May 1st, Dec 25th, Jan 1st, Easter Monday)
- Industry-specific exceptions configurable in settings
- Visual "18" warning indicator during shift assignment

**Mobile App Integration:**

- Full scheduling access via iOS and Android apps
- Employee availability management in app
- Shift application and swap requests via app
- Push notifications for schedule changes
- Offline capability for viewing schedules

**Shift Templates:**

- Create reusable shift templates for recurring patterns
- Template library for common scenarios
- Template-based quick schedule generation
- Seasonal template management
- Template sharing across locations

**Labor Cost Optimization:**

- Set labor budget targets per location/department
- Automatic optimization suggestions to meet targets
- Cost forecasting based on planned schedules
- Overtime cost warnings
- Budget vs. actual cost reporting

**Compliance Checking:**

- Automatic validation against German labor laws
- Rest period requirements checking
- Maximum working hours validation
- U18 employee restrictions
- Break time requirements
- Holiday and special day regulations

**Forecast Integration:**

- Integration with sales forecast data
- Staffing level optimization based on predicted demand
- Historical data analysis for pattern recognition
- Seasonal adjustment recommendations
- Demand-based shift suggestions

## Technical Implementation

### File Structure

**Frontend Files:**

- **PHP:** `v2/pages/product_schichtplan_neu.php` (live `/schichtplan`; partial-based layout, FAQ from `schichtplan-neu/faq-answers-optimized.json`)
  - Alpine.js on `body`, mobile-app visual switcher, AOS, schema (`@graph` + FAQPage)
  - Archived prior template: `v2/pages/product_shiftplan.php` (not routed)

**JavaScript:**

- Alpine.js components for searchable content and interactive UI
- Custom Alpine.js data: `searchableContent` for feature search functionality
- Scroll-based animations and interactions
- No separate JavaScript file - inline Alpine.js components

**CSS:**

- `v2/css/product-pages.min.css` - Shared product pages stylesheet
- Tailwind CSS utility classes for styling
- Custom animations and transitions
- Responsive breakpoints for mobile/tablet/desktop

**Dependencies:**

**Backend Systems:**

- Employee database and management system
- Availability management system
- Notification system (email, push notifications)
- Mobile app backend API
- Time tracking system integration
- Payroll system integration (DATEV)
- Reporting and analytics engine

**External Integrations:**

- DATEV for payroll export
- Mobile app (iOS and Android)
- Email notification service
- Push notification service
- Calendar integration (optional)

**Frontend Libraries:**

- Alpine.js for reactive UI components
- Tailwind CSS for styling
- AOS (Animate On Scroll) for animations

### API Endpoints

**Shift Management:**

- `POST /api/shifts` - Create new shift
- `PUT /api/shifts/{id}` - Update existing shift
- `DELETE /api/shifts/{id}` - Delete shift
- `GET /api/shifts` - List shifts with filters (date range, location, employee)
- `GET /api/shifts/{id}` - Get shift details

**Availability Management:**

- `GET /api/availability` - Get employee availability
- `POST /api/availability` - Set employee availability
- `PUT /api/availability/{id}` - Update availability
- `GET /api/availability/conflicts` - Check for availability conflicts

**Shift Applications:**

- `POST /api/shifts/{id}/apply` - Employee applies for shift
- `GET /api/shifts/{id}/applications` - Get applications for shift
- `POST /api/applications/{id}/approve` - Approve application
- `POST /api/applications/{id}/reject` - Reject application

**Shift Swaps:**

- `POST /api/shifts/swap` - Request shift swap
- `GET /api/swaps` - List pending swap requests
- `POST /api/swaps/{id}/approve` - Approve swap request
- `POST /api/swaps/{id}/reject` - Reject swap request

**Reporting:**

- `GET /api/reports/labor-costs` - Labor cost reports
- `GET /api/reports/coverage` - Coverage analysis reports
- `GET /api/reports/compliance` - Compliance reports
- `GET /api/reports/planned-vs-actual` - Planned vs. actual hours comparison

**Templates:**

- `GET /api/templates` - List shift templates
- `POST /api/templates` - Create new template
- `PUT /api/templates/{id}` - Update template
- `DELETE /api/templates/{id}` - Delete template
- `POST /api/templates/{id}/apply` - Apply template to schedule

**Notifications:**

- `POST /api/notifications/send` - Send notification
- `GET /api/notifications` - Get notification history
- `PUT /api/notifications/{id}/read` - Mark notification as read

**Skills & Work Areas:**

- `GET /api/skills` - List all skills
- `GET /api/work-areas` - List work areas for location
- `POST /api/employees/{id}/skills` - Assign skills to employee
- `GET /api/shifts/{id}/requirements` - Get shift skill requirements

## User Experience

### Detailed User Flow

#### Flow 1: Creating a New Schedule

1. **Access Shift Planning:**

   - Manager logs into Ordio dashboard
   - Navigates to "Schichtplan" section from main menu
   - System loads default view (current week)

2. **Select Time Period:**

   - Manager clicks date picker or week/month selector
   - Chooses planning period (week view or month view)
   - System loads existing shifts for selected period
   - Manager selects location(s) to plan for

3. **View Availability & Context:**

   - System displays employee list with availability indicators
   - Manager sees who's available, who's on vacation, who has restrictions
   - Live time tracking shows who's currently working
   - Skills and certifications displayed for each employee
   - Wage limits and U18 warnings visible

4. **Create Shifts:**

   - **Option A - Drag and Drop:**
     - Manager drags employee from list onto calendar day/time slot
     - System creates shift with default duration
     - Manager adjusts time range by dragging shift edges
   - **Option B - Shift Editor:**
     - Manager clicks "+ New Shift" button
     - Opens shift editor modal
     - Selects date, time range, work area, required skills
     - System suggests available employees based on criteria
     - Manager selects employee(s) and saves
   - **Option C - Template Application:**
     - Manager selects "Apply Template" from template library
     - Chooses template (e.g., "Weekend Service Schedule")
     - System creates shifts based on template
     - Manager adjusts as needed

5. **Optimize Schedule:**

   - Manager reviews labor cost indicator (green/yellow/red)
   - System shows compliance warnings if any violations
   - Manager adjusts shifts to optimize costs and coverage
   - Uses "Optimize" button for AI suggestions
   - Reviews planned vs. actual hours from previous period

6. **Publish Schedule:**

   - Manager clicks "Publish" button
   - System sends notifications to all affected employees
   - Schedule becomes visible in mobile app and web portal
   - Employees receive push notifications and email confirmations

7. **Manage Ongoing Changes:**
   - Employees request shift swaps via app
   - Manager receives notification of swap request
   - Manager reviews and approves/rejects swap
   - System automatically updates schedule
   - All parties notified of change

#### Flow 2: Employee Shift Application

1. **Employee Views Open Shifts:**

   - Employee opens mobile app or web portal
   - Navigates to "Available Shifts" section
   - Sees list of open shifts they're qualified for
   - Views shift details (time, location, work area, pay rate)

2. **Employee Applies:**

   - Employee clicks "Apply" on desired shift
   - System checks availability and conflicts
   - If available, application submitted
   - Manager receives notification

3. **Manager Reviews Application:**
   - Manager sees application in "Pending Applications" section
   - Reviews employee qualifications and availability
   - Approves or rejects application
   - If approved, shift automatically assigned
   - Employee receives notification

#### Flow 3: Shift Swap Request

1. **Employee Initiates Swap:**

   - Employee views their assigned shifts
   - Selects shift they want to swap
   - Clicks "Request Swap"
   - System shows available employees who could take shift
   - Employee selects preferred replacement or opens to all

2. **Replacement Employee Accepts:**

   - Replacement employee receives swap request notification
   - Reviews shift details and their availability
   - Accepts or declines swap request
   - If accepted, swap automatically processed

3. **Manager Approval (if required):**
   - Manager receives notification of swap request
   - Reviews swap details and compliance
   - Approves or rejects swap
   - Both employees notified of outcome

### Detailed Workflows from Helpdesk

The following workflows are based on helpdesk documentation and provide step-by-step guides for common Schichtplanung tasks.

#### Workflow: Creating Shifts

**Prerequisites:**

- Arbeitsbereiche (work areas) must be set up
- Employees must be assigned to work areas

**Steps:**

1. **Access Shift Creation:**

   - Navigate to Schichtplan section
   - Select the date/week for planning
   - Click "+ New Shift" or use drag-and-drop

2. **Configure Shift Details:**

   - **Arbeitsbereich:** Select the work area for the shift
   - **Schichtzeit:** Set start and end times (adjustable by clicking on times)
     - Should align with business operations
     - Must comply with legal rest period requirements
     - System shows warnings for rest period violations if enabled in settings
   - **Anzahl der Mitarbeiter:** Set number of employees needed
   - **Schichtnotizen:** Add shift-specific notes (under "weitere Optionen")
   - **Schlagwörter:** Add tags like "Frühschicht" or "Spätschicht" for better organization
   - **Skills:** Select required skills (only employees with matching skills will be suggested)
   - **Art der Einteilung:** Choose assignment method:
     - Admin assigns employees
     - Employees can apply for shift
     - Employees can self-assign directly

3. **Assign Employees:**

   - System shows available employees based on:
     - Work area assignment
     - Availability (NV=Not Available/red, TV=Partially Available/yellow, V=Available/green)
     - Skills match
     - Wage limits (L=Limit exceeded/red)
     - Rest period compliance (R=Rest period violation/red)
   - Select employee(s) and save

4. **Notifications:**
   - Assigned employees receive push notification and email immediately
   - Employees see assignment in mobile app calendar
   - Notification preferences can be configured in Settings > Benachrichtigungen

#### Workflow: Assigning Employees to Shifts

**Prerequisites:**

- Employees must be assigned to Arbeitsbereiche
- Availability and wage limits should be set

**Steps:**

1. **View Employee Availability:**

   - Employee list shows availability indicators:
     - **NV (rot):** Not available
     - **TV (gelb):** Partially available
     - **V (grün):** Available
     - **D (rot):** Double booking
     - **B (grün):** Application submitted
     - **L (rot):** Wage limit exceeded
     - **R (rot):** Rest period violation

2. **Assignment Methods:**

   - **Admin Assignment:** Manager directly assigns employee
   - **Self-Application:** Employees can apply for open shifts
   - **Direct Self-Assignment:** Employees can directly enter shifts (if enabled)

3. **Assignment Process:**
   - Select shift to assign
   - View available employees filtered by work area and skills
   - Consider availability indicators and warnings
   - Assign employee(s)
   - System sends notifications automatically

#### Workflow: Using Shift Templates

**Creating Templates:**

1. **Create Schedule:**

   - Plan shifts for desired period (day or week)
   - Assign employees as needed

2. **Save as Template:**

   - Click three dots menu (top of plan)
   - Select "Vorlage speichern"
   - Name the template
   - Choose to save with or without employee assignments
   - Save template

3. **Update Existing Template:**
   - When saving, select "Vorlage überschreiben"
   - Choose existing template to update
   - Save changes

**Loading Templates:**

1. **Open Target Period:**

   - Navigate to the week/period where you want to apply template
   - Click three dots menu

2. **Load Template:**

   - Select "Vorlage laden"
   - Choose template from pop-up
   - Select work area(s) to apply shifts to

3. **Configure Loading Options:**

   - **With Employee Assignments:** Loads shifts with previously assigned employees (for recurring teams)
   - **Without Employee Assignments:** Loads empty shifts for new assignment
   - **Publish Immediately:** Shifts visible to employees immediately (triggers notifications)
   - **Save Unpublished:** Shifts created but not visible to employees yet

4. **Apply Template:**
   - Confirm selection
   - System creates shifts based on template
   - Adjust assignments as needed

#### Workflow: Using Skills

**Understanding Skills:**

- **Skills vs. Arbeitsbereiche:**
  - Arbeitsbereiche: Organizational areas (Kitchen, Service, Delivery)
  - Skills: Additional qualifications (Driver's license, Barista certification)
  - Employees must be assigned to Arbeitsbereich first, then skills can be added

**Creating and Managing Skills:**

1. **Create Skill:**

   - When creating shift, go to "Weitere Optionen"
   - Click "keine Skills ausgewählt"
   - Select "Skills verwalten"
   - Click "Skills hinzufügen"
   - Name the skill (e.g., "Führerschein", "Barista")
   - Save skill

2. **Assign Skills to Employees:**

   - Open employee profile
   - Go to "Übersicht" tab
   - Under "Skills" section, search for skill
   - Add skill to employee profile
   - Skill appears for all employees and in shift creation

3. **Use Skills in Shifts:**
   - When creating shift, select required skill(s)
   - Only employees with both:
     - Assignment to the work area
     - The required skill
   - Will be shown as available for assignment

**Example:** Liefertour requiring driver's license

- Create shift in "Lieferung" work area
- Add "Führerschein" skill requirement
- Only employees assigned to "Lieferung" AND with "Führerschein" skill will be available

#### Workflow: Managing Work Areas

**Moving Work Areas:**

1. **Access Settings:**

   - Go to Workspace-Einstellungen
   - Navigate to "Arbeitsbereiche und Standorte"

2. **Reorder:**
   - Select work area
   - Hold and drag to desired position
   - Move up or down to change display order
   - Order determines how work areas appear in planning view

**Deleting or Deactivating Work Areas:**

**Who Can Delete/Deactivate:**

- Only Workspace Administrators
- Users with "Einstellungen > Standorte & Arbeitsbereiche" permission

**Difference Between Deactivate and Delete:**

- **Deactivate:** Work area remains but is hidden from users. All data preserved and can be reactivated later.
- **Delete:** Permanent removal - only possible if no shifts have been recorded in this work area. Once shifts exist, work area can only be deactivated, not deleted.

**Process:**

1. **Access Work Area Settings:**

   - Go to Workspace-Einstellungen > Arbeitsbereiche und Standorte
   - Or click pencil icon next to work area name in shift plan view

2. **Choose Action:**

   - **Deactivate:** Work area hidden but data preserved (can be reactivated)
   - **Delete:** Permanent removal (only if no historical shifts exist)

3. **Confirm Action:**
   - System checks for dependencies
   - If safe, confirms deletion/deactivation
   - Work area removed from active list

**Alternative Method:**

- Can also delete work area directly in shift plan:
  - Click small pencil icon next to work area name
  - Select delete option

**Important Notes:**

- Work area no longer appears in plan, Mitarbeiter-App, or settings
- Work areas no longer filterable - won't appear in Arbeitszeiten filters
- Employees previously assigned to this work area may now have no work area assignment
- Employees without work area assignment cannot be assigned to shifts
- **Tip:** You can delete working hours of the area in the plan if you want to fully remove it, but this permanently deletes working hours data

**To Fully Remove Work Area:**

- Delete all working hours for the area in the plan first
- Then delete the work area
- **Warning:** This permanently deletes working hours data

#### Workflow: Documenting Employee Absences

**Purpose:** Track employee reliability for shift assignment decisions

**Steps:**

1. **Access Shift:**

   - Open shift where employee was absent
   - Or access employee's shift history

2. **Mark Absence:**

   - Find the shift assignment
   - Mark as "Absage" (cancellation)
   - Add notes if needed (reason, date, etc.)

3. **Review Reliability:**
   - System tracks absences per employee
   - View reliability metrics in employee profile
   - Use data for future shift assignment decisions

#### Workflow: Accessing Shift Planning Logs (Protokolle)

**Purpose:** Maintain transparency and track all changes in shift planning

**Steps:**

1. **Access Logs:**

   - Open the shift plan
   - Click on a specific shift
   - Access the "Protokoll" (Protocol/Log) option from the shift details
   - Or access logs from the plan view menu

2. **Review Changes:**

   - The protocol shows:
     - **What changes** were made to the shift (times, roles, employees, work areas)
     - **Who** made the change
     - **When** the change occurred
   - View complete change history for full transparency

3. **Use for Auditing:**
   - Track compliance with planning policies
   - Review planning decisions
   - Maintain accountability
   - Handle internal coordination and documentation
   - Answer questions about shift changes
   - Clearly assign responsibilities

**Benefits:** Full transparency over shift history, helps teams work efficiently and traceably.

#### Workflow: Managing Change Requests (Änderungsanträge)

**Purpose:** Handle employee requests to change past shifts

**Employee Process (Submitting Request):**

1. **Access Change Request:**

   - Open Mitarbeiter-App (Employee App)
   - Navigate to past shifts
   - Select shift to modify
   - Click "Änderungsantrag stellen" (Submit Change Request)

2. **Specify Changes:**
   - Enter desired changes (time corrections, etc.)
   - Add reason if needed
   - Submit request

**Admin Process (Processing Request):**

1. **View Requests:**

   - Go to Arbeitszeiten (Working Hours) section
   - View pending change requests
   - See employee name, shift details, and requested changes

2. **Review Request:**

   - Check if change is reasonable
   - Verify compliance with labor laws
   - Review shift history and context

3. **Approve or Reject:**
   - **If approved:**
     - System automatically updates shift
     - Employee receives notification
     - Change reflected in Arbeitszeiten
   - **If rejected:**
     - Employee receives notification with reason
     - Original shift remains unchanged

**Notifications:**

- Employee receives notification when request is approved or rejected
- Employee can view status in Mitarbeiter-App
- Admin sees all requests in Arbeitszeiten section

#### Workflow: U18 Labor Law Compliance (Jugendarbeitsschutzgesetz)

**Purpose:** Ensure compliance with youth labor protection laws for employees aged 15-18

**Activation:**

1. **Enable U18 Warnings:**

   - Go to Einstellungen (Settings)
   - Navigate to setting #19 (Jugendarbeitsschutzgesetz)
   - Activate compliance tracking
   - System will now track and warn about violations

2. **System Behavior:**
   - Automatically identifies employees under 18
   - Tracks compliance with youth labor laws
   - Shows warnings during shift assignment (e.g., "18" indicator for rest period violations)
   - Prevents assignment if limits exceeded

**Compliance Rules:**

**General Rules (Always Apply):**

- **Maximum Working Hours:**

  - 8 hours per day
  - 40 hours per week

- **Rest Periods:**

  - Minimum 12 hours rest between shifts

- **Prohibited Days:**
  - May 1st (Labor Day)
  - December 25th (Christmas)
  - January 1st (New Year's Day)
  - Easter Monday
  - After 14:00 on December 24th (Christmas Eve)
  - After 14:00 on December 31st (New Year's Eve)

**Industry-Specific Rules (Configurable in Settings):**

- **Maximum Shift Time:**

  - 10 hours shift time (including breaks) per day
  - May vary by industry

- **Night Rest:**

  - No work between 20:00 and 06:00
  - May vary by industry

- **Weekend Restrictions:**
  - No work on Saturdays and Sundays
  - May vary by industry

**During Shift Assignment:**

- System shows "18" warning if rest period violated
- Prevents assignment if limits exceeded
- Manager must resolve compliance issues before assigning
- Visual indicators help identify compliance problems immediately

**During Shift Assignment:**

- System shows "18" warning if rest period violated
- Prevents assignment if limits exceeded
- Manager must resolve compliance issues before assigning

#### Workflow: Deleting Plan Templates

**Steps:**

1. **Access Templates:**

   - Go to template library or three-dots menu
   - View saved templates

2. **Delete Template:**
   - Select template to delete
   - Choose delete option
   - Confirm deletion
   - Template removed from library

**Note:** Deleted templates cannot be recovered, but shifts created from templates remain unchanged.

#### Workflow: Moving Work Areas (Arbeitsbereiche verschieben)

**Purpose:** Reorder work areas to customize display order in shift plan

**Steps:**

1. **Access Settings:**

   - Go to Workspace-Einstellungen (Workspace Settings)
   - Navigate to Arbeitsbereiche und Standorte (Work Areas and Locations)

2. **Reorder Work Areas:**
   - Select a work area
   - Hold and drag to desired position
   - Move up or down as needed
   - Release to set new position

**Result:** Work areas display in the new order in the shift plan view.

#### Workflow: Documenting Employee Absences (Absagen dokumentieren)

**Purpose:** Track employee reliability by documenting shift cancellations

**Prerequisites:**

- Function must be enabled in Workspace Settings > Schichtplan & Zeiterfassung > Nr. 8
- Note: Employees cannot cancel shifts themselves - only admins can document absences

**Steps:**

1. **Enable Absence Documentation:**

   - Go to Workspace Settings
   - Navigate to Schichtplan & Zeiterfassung
   - Enable "Absagen dokumentieren" (Document Absences)
   - Optionally set time window (e.g., 72 hours before shift start)

2. **Document an Absence:**

   - Open the shift where employee cancelled
   - Click the crossed-out circle icon (next to "Austragen" option)
   - Absence is documented in system
   - Employee is removed from shift

3. **View Absence History:**
   - When assigning employee to future shifts
   - System shows how many times they've cancelled
   - Helps assess reliability for future planning

**Time Window Behavior:**

- **Within time window (e.g., 72 hours before):** Absence is documented
- **Outside time window:** Employee removed but absence not documented
- Helps track short-notice cancellations specifically

**Use Cases:**

- Track repeated cancellations
- Assess employee reliability
- Make informed decisions for future shift assignments

### UI Components

**Calendar View:**

- **Layout:** 7-column grid (Monday-Sunday) with time slots
- **Shift Cards:** Visual shift blocks showing:
  - Employee name(s)
  - Time range (start-end)
  - Work area indicator (color-coded)
  - Skill requirements badge
  - Coverage indicator (e.g., "2/3" for 2 of 3 required employees)
  - Live time tracking indicator (if shift is active)
- **Drag and Drop:** Shifts can be dragged between days/times
- **Color Coding:** Different colors for different work areas or shift types
- **Current Day Highlight:** Today's column highlighted
- **Scrollable:** Horizontal scroll for multi-week view

**Employee List Panel:**

- **Sidebar or Top Bar:** List of available employees
- **Employee Cards:** Each showing:
  - Name and photo
  - Availability status (available/unavailable/on vacation)
  - Skills badges
  - Current shift status (if working)
  - Wage limit indicator
  - U18 warning badge (if applicable)
- **Filtering:** Filter by skills, availability, location, work area
- **Search:** Search employees by name
- **Drag Source:** Employees can be dragged to calendar

**Shift Editor Modal:**

- **Form Fields:**
  - Date picker
  - Time range selector (start time, end time)
  - Work area dropdown
  - Required skills multi-select
  - Employee assignment (single or multiple)
  - Shift notes/instructions
- **Suggestions Panel:** Shows recommended employees based on criteria
- **Compliance Warnings:** Real-time warnings for violations
- **Cost Indicator:** Shows estimated labor cost for shift
- **Save/Cancel Buttons**

**Template Library:**

- **Grid View:** Cards showing template previews
- **Template Card:** Shows:
  - Template name
  - Description
  - Preview of shift pattern
  - Last used date
- **Search/Filter:** Find templates by name or pattern
- **Quick Apply:** One-click template application
- **Edit/Delete:** Manage templates

**Analytics Dashboard:**

- **Labor Cost Chart:** Visual chart showing planned vs. actual costs
- **Coverage Heatmap:** Visual representation of coverage gaps
- **Compliance Score:** Overall compliance rating with details
- **Employee Utilization:** Chart showing employee hours distribution
- **Export Options:** Export reports to PDF, Excel, CSV
- **Date Range Selector:** Filter analytics by time period

**Live Time Tracking Widget:**

- **Current Shifts Panel:** Shows who's currently working
- **Real-time Updates:** Updates automatically as employees clock in/out
- **Duration Display:** Shows how long each employee has been working
- **Quick Actions:** Quick access to adjust current shifts

**Notification Center:**

- **Bell Icon:** Notification indicator with count badge
- **Dropdown Panel:** List of recent notifications
- **Notification Types:**
  - Shift applications
  - Swap requests
  - Schedule changes
  - Compliance warnings
  - System updates
- **Mark as Read:** Dismiss notifications
- **Action Buttons:** Quick approve/reject from notifications

**Mobile App Interface:**

- **Simplified Calendar View:** Optimized for mobile screens
- **Swipe Gestures:** Swipe to navigate between weeks
- **Touch Interactions:** Tap to view shift details, long-press for actions
- **Push Notifications:** Real-time notifications for schedule changes
- **Offline Mode:** View schedules offline, sync when online

## Visual Documentation

### Screenshots

**Shift Planning Calendar:**

- **File:** `/v2/img/screenshots/schichtplanung-calendar.webp`
- **Alt Text:** "Schichtplanung calendar view showing weekly schedule with shift assignments"
- **Caption:** Weekly calendar view with drag-and-drop shift planning interface

**Shift Editor:**

- **File:** `/v2/img/screenshots/schichtplanung-shift-editor.webp`
- **Alt Text:** "Schichtplanung shift editor showing shift creation form"
- **Caption:** Shift editor modal with date, time, work area, and employee selection

**Employee Availability:**

- **File:** `/v2/img/screenshots/schichtplanung-availability.webp`
- **Alt Text:** "Schichtplanung availability view showing employee availability calendar"
- **Caption:** Employee availability management interface with calendar view

**Shift Applications:**

- **File:** `/v2/img/screenshots/schichtplanung-applications.webp`
- **Alt Text:** "Schichtplanung shift applications showing open shifts and employee applications"
- **Caption:** Shift application interface where employees can apply for open shifts

**Analytics Dashboard:**

- **File:** `/v2/img/screenshots/schichtplanung-analytics.webp`
- **Alt Text:** "Schichtplanung analytics dashboard showing labor costs and coverage metrics"
- **Caption:** Analytics dashboard with labor cost charts, coverage heatmap, and compliance scores

**Mobile App:**

- **File:** `/v2/img/screenshots/schichtplanung-mobile.webp`
- **Alt Text:** "Schichtplanung mobile app showing schedule view on smartphone"
- **Caption:** Mobile app interface optimized for viewing and managing schedules on the go

### Diagrams

**User Flow Diagram:**

- **File:** `/v2/img/diagrams/schichtplanung-user-flow.svg`
- **Description:** Complete flow from schedule creation → employee assignment → shift applications → swap requests → schedule publishing
- **Elements:** Calendar view, drag-and-drop, shift editor, applications, approvals, notifications

**Integration Diagram:**

- **File:** `/v2/img/diagrams/schichtplanung-integration.svg`
- **Description:** Integration flow showing Schichtplanung → Zeiterfassung → Lohnabrechnung → Abwesenheiten
- **Elements:** Shift planning, time tracking, payroll calculation, absence management

**Workflow Diagram:**

- **File:** `/v2/img/diagrams/schichtplanung-workflow.svg`
- **Description:** Detailed workflow for shift planning process with decision points
- **Elements:** Template selection, availability check, skill matching, compliance validation, optimization

## Maintenance

### Update Schedule

- **Regular updates:** Monthly feature enhancements
- **Compliance updates:** Quarterly updates for labor law changes
- **Holiday calendar updates:** Annual updates for holiday schedules
- **Bug fixes:** As needed based on user feedback

### Common Updates

- **Labor law compliance:** Update rules for new regulations (rest periods, maximum hours, U18 restrictions, night shift regulations)
- **Holiday calendars:** Update holiday schedules annually for all supported regions
- **Feature enhancements:** Add new scheduling capabilities (AI optimization, predictive scheduling, demand forecasting)
- **Performance optimization:** Improve scheduling algorithm performance for large teams
- **Template library:** Add new shift templates based on industry patterns
- **Integration updates:** Enhance integration with Zeiterfassung, Lohnabrechnung, and other features

## Related Documentation

- [Product Pages Inventory](../pages/product-pages/PRODUCT_PAGES_INVENTORY.md)
- [Product Features Inventory](PRODUCT_FEATURES_INVENTORY.md)
- [Schichtplan product page (`/schichtplan`)](../pages/product-pages/shiftplan-documentation.md)

## Related Cursor Rules

- [product-pages.mdc](../../../../.cursor/rules/product-pages.mdc)
- [shared-patterns.mdc](../../../../.cursor/rules/shared-patterns.mdc)
- [global.mdc](../../../../.cursor/rules/global.mdc)
