suggestSlots was skill-blind and assumed a default 8-17 shift for every tech. Now: - SKILL FILTER: only techs whose skills (or _user_tags) include the requested skill are considered. Dialog passes the picked chip's skill. - REAL SHIFTS: slot windows come from published Shift Assignment × Shift Template (garde/on_call excluded). A tech with no regular shift that day yields no slot — so it reflects reality (needs shifts created). - WEEKENDS reserved for repairs: Sat/Sun skipped unless the skill is a repair/dépannage. Removed SLOT_DEFAULT_SHIFT. - Empty-state message hints to publish a shift / weekend rule. Verified: with only garde shifts in the horizon, correctly returns 0 (regular_count=0). Skill/weekend/garde-exclusion logic confirmed via data diagnostic. Produces slots once a regular day-shift is published for a qualified tech. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| client | ||
| field-tech | ||
| ops | ||
| portal | ||
| website | ||