The Calculation Rules page (reachable atDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/dmaman86/shiftly/llms.txt
Use this file to discover all available pages before exploring further.
/en/calculation-rules or /he/calculation-rules) is an interactive reference that documents every pay rule implemented in Shiftly’s domain layer. Rather than a static table, it uses expandable accordion sections so you can drill into exactly the rule category you need. All percentages in Shiftly are stored as decimal multipliers — 1 means 100%, 1.25 means 125%, 1.5 means 150%, and 2 means 200%.
Throughout the codebase, pay rates are normalised as plain multipliers:
fieldShiftPercent.hours100 = 1, hours125 = 1.25, hours150 = 1.5, hours200 = 2, hours50 = 0.5, hours20 = 0.2. These constants live in src/constants/fields.constant.ts.Page Components
The Calculation Rules page is composed of three presentational building blocks:RuleCard— a card with a bold title, a dividing rule, and a description paragraph. Groups a related set of accordion items under one topic (e.g. “Extra Hours”, “Salary Additions”, “Meal Allowance”).RuleAccordion— a zero-elevation<Accordion>inside aRuleCard. Expanding it reveals the detailed rule, timeline visualisation, or table for that specific topic. Each accordion fires an analytics event on expand.TimelineNote— a highlighted callout inside an accordion, available in three variants:info(blue),warning(amber), andtip(green). Used to surface caveats, automatic behaviours, and rate-change notes.
Rule Categories
Regular Hours (Overtime Tiers)
Regular Hours (Overtime Tiers)
Regular-hour calculation resets every calendar day. The threshold used for the first tier is the Standard Hours value configured in the Configuration panel (default
Example with default 6.67 standard hours:
6.67).| Tier | Hours | Rate |
|---|---|---|
| Standard | First standardHours hours | 100% |
| Overtime tier 1 | Next 2 hours | 125% |
| Overtime tier 2 | All remaining hours | 150% |
- Hours 0 – 6.67 → 100%
- Hours 7.67 – 8.67 → 125%
- Hours 8.67+ → 150%
regular.hours100, regular.hours125, and regular.hours150 in the MonthPayMap.Night Bonuses (Evening & Night Additions)
Night Bonuses (Evening & Night Additions)
Night bonuses are additions on top of the regular rate and apply to any workday (including Fridays). They stack with the base pay for each hour worked in the relevant window:
A shift that spans midnight generates both a 22:00–midnight segment (+50%) and a 00:00–06:00 segment (+50%) on the next calendar day, provided the next day is not itself a full special day. The cross-day note in the table hints: “Check ✅ for shifts crossing midnight.”On Friday / holiday-eve days (SpecialPartialStart), the evening bonus window (14:00–22:00, +20%) applies during the regular-rate portion of the day up until the Shabbat transition time (17:00 winter / 18:00 summer DST). After the transition, Shabbat rates replace the regular + bonus calculation.
| Window | Bonus | Field |
|---|---|---|
| 14:00 – 22:00 (evening) | +20% | extra.hours20 |
| 22:00 – 06:00 (night) | +50% | extra.hours50 |
| 00:00 – 06:00 (carries from previous night) | +50% | extra.hours50 |
Shabbat & Holiday (Full Special Day — SpecialFull)
Shabbat & Holiday (Full Special Day — SpecialFull)
Days classified as
Sick and vacation checkboxes are hidden on full special days — these days cannot be marked as absence days. Regular overtime tiers do not apply; only the Shabbat-rate segments are used.
WorkDayType.SpecialFull (Saturday and Jewish public holidays such as Rosh Hashana, Yom Kippur, Pesach, Shavuot, Independence Day, etc.) use Shabbat rates for the entire day:| Time Window | Rate | Field |
|---|---|---|
| 06:00 – 22:00 | 150% | special.shabbat150 |
| 22:00 – 06:00 (+ 00:00 – 06:00) | 200% | special.shabbat200 |
Partial Special Days (Friday / Holiday Eve — SpecialPartialStart)
Partial Special Days (Friday / Holiday Eve — SpecialPartialStart)
Days classified as
The transition time is determined automatically from the date:
WorkDayType.SpecialPartialStart (Fridays and holiday eves such as Erev Rosh Hashana, Erev Yom Kippur, etc.) apply regular rates first, then Shabbat rates after the transition time:| Phase | Time | Rates |
|---|---|---|
| Regular phase | From shift start up to transition | Standard 100%/125%/150% + evening bonus (+20% from 14:00) |
| Shabbat phase — day | Transition time – 22:00 | 150% Shabbat (special.shabbat150) |
| Shabbat phase — night | 22:00 – 06:00 next day | 200% Shabbat (special.shabbat200) |
- Summer (DST active): 18:00
- Winter (standard time): 17:00
fieldMinutes.min17 = 17 * 60 and fieldMinutes.min18 = 18 * 60 in fields.constant.ts. The system detects DST automatically — no manual configuration is required.Per-Diem Allowance (אש״ל)
Per-Diem Allowance (אש״ל)
Per-diem is a daily monetary allowance awarded based on shift duration and whether the employee performed a duty shift (marked with the 🚗 icon). Points are accumulated across the month and converted to a shekel amount using a historical rate timeline.
Historical rates (per point) as documented in the app:
The per-diem amount stored in
| Tier | Condition | Points |
|---|---|---|
| Tier A | Overtime ≥ 2 hours (no meal provided by employer) | 1 pt — higher rate |
| Tier B | Overtime ≥ 2 hours (meal provided by employer) | 1 pt — standard rate |
| Tier C | Night shift / duty | 1 pt — reduced rate |
| Condition | Until Sep 2024 | From Sep 2024 |
|---|---|---|
| Overtime ≥ 2 h, no employer meal | ₪20.70 | ₪23.80 |
| Overtime ≥ 2 h, meal provided | ₪19.70 | ₪21.10 |
| Night shift | ₪13.50 | ₪14.50 |
MonthPayMap.perDiem is a PerDiemInfo object: { tier: "A" | "B" | "C" | null, points: number, amount: number }. The amount field is resolved at render time using the rate timeline for the selected month/year.Meal Allowance (כלכלה)
Meal Allowance (כלכלה)
Meal allowance is a separate daily allowance distinct from per-diem. It tracks two sub-types based on shift eligibility:
The monetary rate per point is resolved from a historical rate timeline, identical in mechanism to per-diem. The result is stored in The official eligibility thresholds and point values are published by Israel’s Civil Service Commission. A direct link to the official government PDF is provided on the in-app Calculation Rules page.
| Type | Points | Description |
|---|---|---|
| Large meal allowance | 2 pts | Awarded when a shift meets the large-allowance threshold. |
| Small meal allowance (shift C) | 1 pt | Awarded when a shift meets the small-allowance (shift C) threshold. |
MonthPayMap.mealAllowance:Rate Normalisation Reference
All internal rate constants in Shiftly follow a consistent decimal normalisation:Daily View
See these rules applied in practice — enter shifts and watch the expanded breakdown columns populate with 100%/125%/150% and Shabbat hours.
Configuration
Set the Standard Hours threshold that determines where the 100% → 125% overtime boundary falls each day.