Fix "Configured" badge for secret-less integrations (hotel_location)

isConfigured only checked integration.secrets for a MASKED value, so any
integration with zero secretFields (hotel_location: lat/lon only, no
secrets) could never show "Configured" even with valid values saved —
same edge case hosted_tables already needed a special-case for. Add the
matching special-case for hotel_location. Also add proper FIELD_LABELS
entries for latitude/longitude instead of showing the raw field name.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-08-25 11:26:50 +00:00
parent 06690f0581
commit b4c2270973

View file

@ -39,6 +39,7 @@ const FIELD_LABELS: Record<string, string> = {
email: 'Email', sync_hours: 'Sync Interval (hours)', user: 'Username', pass: 'Password', email: 'Email', sync_hours: 'Sync Interval (hours)', user: 'Username', pass: 'Password',
location_id: 'Default Location', from: 'From Address', reply_to: 'Reply-To Address', location_id: 'Default Location', from: 'From Address', reply_to: 'Reply-To Address',
backup_path: 'Backup Directory', site_url: 'Site URL', backup_path: 'Backup Directory', site_url: 'Site URL',
latitude: 'Latitude', longitude: 'Longitude',
} }
interface AppRow { interface AppRow {
@ -241,6 +242,7 @@ function IntegrationCard({ integration, onSaved }: { integration: Integration; o
const isConfigured = Object.values(integration.secrets).some(v => v === MASKED) const isConfigured = Object.values(integration.secrets).some(v => v === MASKED)
|| (integration.slug === 'hosted_tables' && !!integration.config.site_url) || (integration.slug === 'hosted_tables' && !!integration.config.site_url)
|| (integration.slug === 'hotel_location' && !!integration.config.latitude && !!integration.config.longitude)
return ( return (
<div style={{ <div style={{