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:
parent
06690f0581
commit
b4c2270973
1 changed files with 2 additions and 0 deletions
|
|
@ -39,6 +39,7 @@ const FIELD_LABELS: Record<string, string> = {
|
|||
email: 'Email', sync_hours: 'Sync Interval (hours)', user: 'Username', pass: 'Password',
|
||||
location_id: 'Default Location', from: 'From Address', reply_to: 'Reply-To Address',
|
||||
backup_path: 'Backup Directory', site_url: 'Site URL',
|
||||
latitude: 'Latitude', longitude: 'Longitude',
|
||||
}
|
||||
|
||||
interface AppRow {
|
||||
|
|
@ -241,6 +242,7 @@ function IntegrationCard({ integration, onSaved }: { integration: Integration; o
|
|||
|
||||
const isConfigured = Object.values(integration.secrets).some(v => v === MASKED)
|
||||
|| (integration.slug === 'hosted_tables' && !!integration.config.site_url)
|
||||
|| (integration.slug === 'hotel_location' && !!integration.config.latitude && !!integration.config.longitude)
|
||||
|
||||
return (
|
||||
<div style={{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue