a2fc70ae57
OnPostPublishAsync inserted a Shift/Job with FacilityId=0 when no facility was selected (e.g. the dropdown is empty because no facilities exist yet), throwing FK_Shifts_Facilities_FacilityId and surfacing the production error page. - Resolve-or-create the facility before insert: use the picked one, else create an unverified Facility from a typed name (reusing same-named). - Guard the role too; on missing facility/role redirect back with a Persian error message instead of 500. - Review form: add "new facility name" input + "— none —" option + error alert; add .alert-error style. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>