IAV-1105/feat(legal-agent): improve wizard notifications, integrations and error UX
- Notifications step & workflows
Fetch Slack channels on entering the notifications step (using listSlackChannelsForCredential), with fallback to getAgentIntegrationStatus when credentialInstanceUid is missing. Support multiple active channels when saving notification config by using allChannelsConfig and building notificationTypes with per-type channel lists. Validate contact information per channel (Gmail/Teams) and surface clear error messages.
- Slack & Teams integrations
Enhance Slack integration step with duplicate-account detection based on Slack bot_id (platformAccountId) and persist this in the integration config. Restore Slack webhook URL and connection state when resuming the wizard; avoid re-fetching schemas on repeated failures. Improve Teams integration restoration by parsing teamsTeamUrl to recover teamsTeamId after refresh.
- Wizard flow & routing
Fix step restoration by reading currentStepNumber from the stored wizard status and guarding against overwrites right after client-side step advances. On legal wizard completion, redirect to /dashboard/agents/legal from the agent detail page instead of just calling the local completion handler.
- Chat & legal sections UX
Disable the unified chat input when the legal agent is not active. Redesign the tag input with an explicit “Ajouter” button, better keyboard handling, and clearer tag display below the field. Wire agentUid into the legal notifications configuration section.
- Validation & error handling
Enforce that the “date de début d’exercice” is not before the company creation/immatriculation date, with inline UI feedback and a LEGAL_076 code. Add new legal error codes (e.g. LEGAL_075, LEGAL_076) and a shared getLegalErrorMessage helper used across legal stores and training components for consistent, French error messages. Refine endpoint set by adding activate / deactivate legal agent APIs.