const NotificationPanel = ({
error,
message,
settings,
capabilities,
loading,
dirty,
saving,
onReset,
onSave,
onFieldChange,
onSendTest,
onCopyLink,
copyFeedback,
ntfyPreviewUrl,
location,
locationLoading,
locationSaving,
locationError,
onDetectLocation,
onClearLocation
}) => {
return (
{error && (
{error}
)}
{message && (
{message}
)}
{!capabilities.ntfy.enabled ? (
Diese Option wurde vom Admin deaktiviert. Bitte frage nach, wenn du ntfy nutzen möchtest.
) : (
onFieldChange('ntfy', 'topic', event.target.value)}
placeholder="z. B. mein-pickup-topic"
className="border rounded p-2 w-full focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
disabled={!settings.ntfy.enabled}
/>
{ntfyPreviewUrl && (
{ntfyPreviewUrl}
)}
{copyFeedback &&
{copyFeedback}
}
)}
{!capabilities.telegram.enabled ? (
Telegram-Benachrichtigungen sind derzeit deaktiviert oder der Bot ist nicht konfiguriert.
) : (
)}
Standort für Entfernungssortierung
Der Standort wird für die Entfernungskalkulation im Monitoring genutzt. Nur für dich sichtbar.
{location && (
)}
{locationLoading ? (
Standort wird geladen...
) : location ? (
Aktueller Standort: {location.lat.toFixed(4)}, {location.lon.toFixed(4)}
{location.label && (
– {location.label}
)}{' '}
(
{location.updatedAt ? new Date(location.updatedAt).toLocaleString('de-DE') : 'Zeit unbekannt'})
{location.labelDistanceKm !== undefined && (
Nächster bekannte Betrieb ca. {location.labelDistanceKm.toFixed(1)} km entfernt.
)}
) : (
Kein Standort hinterlegt.
)}
{locationError &&
{locationError}
}
);
};
export default NotificationPanel;