# Shifts and Calendars

A shift is a planned operating time window for an asset or group of assets, such as Day Shift or Evening Shift. Kanoa uses
shifts to report on production by shift, and the schedule can use them to keep work inside shift time. This lesson shows you
how to read the shift pattern and add a one-off shift.

Creating, editing and deleting shifts needs the **Schedule Shifts** security function. Without it you can still read the
calendar.

## Open the Shift Calendar

1. Open **Ops → Scheduling → Shifts** from the navigation menu.
2. Click the asset selector to choose the site, area or asset you want to see. For CoreForge, start with the
   **Philadelphia** site.

![The shift calendar](https://docs.kanoa.ai/img/shifts/scheduling-shifts.png)

Three controls change what you see:

- **Asset Selector**: which assets the shifts are shown for.
- **Display mode**: a calendar or a list.
- **Period**: month, week or day.

When a site is selected, the calendar shows shift times in the site's time zone.

## Read the Shift Pattern

Shifts repeat. A shift such as Day Shift is entered once with a recurrence, for example Monday to Friday, and shows on every
matching day. A rotation across several weeks is built the same way, with a pattern that repeats every number of weeks.

Shifts are inherited down the asset hierarchy. If you look at **Machine 1** and it has no shift of its own, it shows the
shifts of its area or site. Once a shift is created at any level, that level stops inheriting from above. In the CoreForge
plant, a line with its own shift, such as Manual Pack 1, shows only that shift.

:::tip
If a line shows different shifts from its site, check whether someone created a shift on the line itself.
:::

::embed-section{src="../../kanoa-ops/shifts.md#features" collapsed="true" summary="Reference Materials: Shift Features - Time zones, inherited shifts and rotation patterns."}

## Add a One-Off Shift

Use a shift that doesn't repeat for a special shift, such as overtime on a Saturday.

1. In the calendar view, select the time you want the shift to cover.
2. Click the **Add** button on the toolbar.
3. Select the asset if it isn't already filled in.
4. Select the shift name. To create a new name, type it in the dropdown and select **create**.
5. Click the circle to choose a color for the shift.
6. Set the start and end times.
7. Leave **Does Not Repeat** as it is, then save.

To change a shift, select it and click the **Edit** button. To remove one, select it and click the **Delete** button, or press
the Delete key.

![The shift editor](https://docs.kanoa.ai/img/shifts/shiftEventEditor.png)

{/*
TODO: Confirm on a gateway how to handle a holiday inside a repeating shift. The docs only describe non-repeating shifts for
special one-off shifts. Check whether Edit or Delete on a repeating shift offers "this event only" or changes the whole
series, then write the holiday steps. Also confirm the Save button label in the shift editor.
*/}

::embed-section{src="../../kanoa-ops/shifts.md#adding-shifts" collapsed="true" summary="Reference Materials: Adding Shifts - The full steps for the shift editor."}

## Check Your Understanding

1. Which security function do you need to add or delete a shift?
2. Machine 1 has no shift of its own. Where do the shifts on its calendar come from?
3. How do you add a shift that only happens once?

<details>
<summary>Answers</summary>

1. **Schedule Shifts**.
2. They're inherited from higher in the asset hierarchy, such as its area or the site.
3. Add a shift in the editor and leave it set to **Does Not Repeat**.

</details>
