feat: Add SMTP settings and collapsible email configuration UI

- Add SMTP fields to TicketEmailSettings model (host, port, TLS/SSL, credentials, from email/name)
- Update serializers with SMTP fields and is_smtp_configured flag
- Add TicketEmailTestSmtpView for testing SMTP connections
- Update frontend API types and hooks for SMTP settings
- Add collapsible IMAP and SMTP configuration sections with "Configured" badges
- Fix TypeScript errors in mockData.ts (missing required fields, type mismatches)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
poduck
2025-11-29 18:28:29 -05:00
parent 0c7d76e264
commit cfc1b36ada
94 changed files with 13419 additions and 1121 deletions

View File

@@ -58,7 +58,15 @@ export const SandboxProvider: React.FC<SandboxProviderProps> = ({ children }) =>
export const useSandbox = (): SandboxContextType => {
const context = useContext(SandboxContext);
if (context === undefined) {
throw new Error('useSandbox must be used within a SandboxProvider');
// Return default values when used outside SandboxProvider
// This happens for platform admins who don't have sandbox mode
return {
isSandbox: false,
sandboxEnabled: false,
isLoading: false,
toggleSandbox: async () => {},
isToggling: false,
};
}
return context;
};