---
title: "Planning"
description: "Schichten und Ressourcen. Jede App ist ein Modul auf einem gemeinsamen Datenmodell."
canonical: "https://obop-platform.sliplane.app/de/apps/planning/"
lang: "de"
---

# Planning

## Wofür sie gedacht ist

Plan shifts for employees from reusable templates. A shift with nobody assigned is an open shift; the workflow runs from open through published to confirmed by the employee.

## Was das Paket leistet und was nicht

Shifts for employees, with roles and reusable templates. A shift has a day and a start and end in minutes since midnight (0 to 1439; 540 is 09:00). A shift with no employee is an open shift. Workflow: open, published, confirmed by the employee. Needs the Human Resources package.

## Modelle

### `planning_role`

A role a shift is planned for, for example cashier or electrician

Lesegruppe: `planning.user`. Schreibgruppe: `planning.manager`.

| Feld | Art | Datenklasse | Personenbezogene Daten | Gruppe | Agenten sehen | Beschreibung |
|---|---|---|---|---|---|---|
| `name` | text | `none` | nein | `planning.user` | im Klartext | Role name |
| `note` | longtext | `none` | nein | `planning.user` | im Klartext | What the role involves |

### `planning_template`

A reusable shift pattern to copy into shifts

Lesegruppe: `planning.user`. Schreibgruppe: `planning.manager`.

| Feld | Art | Datenklasse | Personenbezogene Daten | Gruppe | Agenten sehen | Beschreibung |
|---|---|---|---|---|---|---|
| `name` | text | `none` | nein | `planning.user` | im Klartext | Template name, for example Morning shift |
| `role_id` | ref → planning_role | `none` | nein | `planning.user` | im Klartext | The role the template is for |
| `start_minute` | number | `none` | nein | `planning.user` | im Klartext | Start in minutes since midnight (540 is 09:00) |
| `end_minute` | number | `none` | nein | `planning.user` | im Klartext | End in minutes since midnight (1020 is 17:00) |

### `planning_shift`

A slot of work on one day for one role, optionally assigned to an employee

Lesegruppe: `planning.user`. Schreibgruppe: `planning.manager`.

| Feld | Art | Datenklasse | Personenbezogene Daten | Gruppe | Agenten sehen | Beschreibung |
|---|---|---|---|---|---|---|
| `name` | text | `none` | nein | `planning.user` | im Klartext | Short title, for example Opening shift |
| `role_id` | ref → planning_role | `none` | nein | `planning.user` | im Klartext | The role needed |
| `employee_id` | ref → hr_employee | `internal` | ja | `planning.user` | maskiert | Employee the shift is assigned to; empty for an open shift |
| `work_date` | date | `none` | nein | `planning.user` | im Klartext | Day of the shift (YYYY-MM-DD) |
| `start_minute` | number | `none` | nein | `planning.user` | im Klartext | Start in minutes since midnight, 0 to 1439 (540 is 09:00) |
| `end_minute` | number | `none` | nein | `planning.user` | im Klartext | End in minutes since midnight, 0 to 1439 (1020 is 17:00) |
| `note` | longtext | `none` | nein | `planning.user` | im Klartext | Instructions for whoever works the shift |
| `state` | select (open, published, confirmed) | `none` | nein | `planning.user` | im Klartext | Shift status: open, published, confirmed |

## Workflows

### `planning_shift`

| Aktion | Bewegt | Wer sie ausführen darf | Freigabe |
|---|---|---|---|
| `planning_shift.publish` | state: open → published | `planning.manager` | nein |
| `planning_shift.unpublish` | state: published → open | `planning.manager` | nein |
| `planning_shift.confirm` | state: published → confirmed | `planning.manager` | nein |

## Berechtigungsgruppen

Von dieser App verwendete Gruppen:

- `planning.manager`
- `planning.user`

## Freigabeschritte

Kein Schritt dieser App braucht eine Freigabe, abgesehen vom Löschen von Datensätzen.

## Was Agenten tun können und was nicht

Ein Agent kann Datensätze dieser App lesen, durchsuchen, anlegen und aktualisieren sowie Aktionen ausführen, die keine Freigabe brauchen, und zwar innerhalb der Berechtigungsgruppen seines Tokens.

Diese Schritte kann er nur vorschlagen, und eine Person muss sie freigeben: `planning_role.delete`, `planning_template.delete`, `planning_shift.delete`.

Personenbezogene Daten werden als Platzhalter maskiert: `planning_shift.employee_id`.

## Abhängigkeiten

- `hr`

## Installation

Installieren Sie sie in der App Customize (Marktplatz) oder über die Kommandozeile:

```bash
obop modules install-from planning
```

Erfordert eine Datenbank und Administratorrechte.

## Selbst bauen

[Der Modulleitfaden zeigt, wie Apps wie diese geschrieben werden](/de/docs/reference/module-manifest/)
