diff --git a/apps/web/src/app/(portal)/modules/tender-radar/page.tsx b/apps/web/src/app/(portal)/modules/tender-radar/page.tsx index 7826d45..ee1c995 100644 --- a/apps/web/src/app/(portal)/modules/tender-radar/page.tsx +++ b/apps/web/src/app/(portal)/modules/tender-radar/page.tsx @@ -68,17 +68,23 @@ function TenderRadarContent() { {/* Right-side cluster: settings gear + "Jetzt abrufen" trigger */}
{/* - * Einstellungen-Link. Absolute literal href (NOT the dynamic - * [category]/[moduleSlug] basePath): the tender-radar settings page - * only exists as the literal route /modules/tender-radar/settings — - * the dynamic settings route returns "Modul nicht gefunden" for this - * module, so the gear must point at the literal path directly. + * Zahnrad-Link. Absolute literal href (NOT the dynamic + * [category]/[moduleSlug] basePath): tender-radar routes only + * exist as literal paths — the dynamic settings route returns + * "Modul nicht gefunden" for this module, so the gear must point + * at the literal path directly. + * + * Phase 17 Plan 03 (D-03): points at "Meine Quellen", not the + * admin-only settings page — that's the page every module user + * (not just administrators) is allowed to configure something + * on; administrators reach the platform-wide settings from there + * with one more click. */}
+
+
+
+ ); + } - const handleChange = async (value: string) => { - const next = value as NotificationPref['digestInterval']; - setDigestInterval(next); - setError(null); - setSaveSuccess(false); - setIsSaving(true); - try { - const result = await saveNotificationPref(next); - setDigestInterval(result.digestInterval); - setSaveSuccess(true); - } catch (err) { - setError( - err instanceof Error ? err.message : t('settings.errorSave'), - ); - } finally { - setIsSaving(false); - } - }; + if (!isAdmin) { + return ( +
+

+ {t('settings.title')} +

+

+ {t('settings.accessDeniedText')} +

+ + {t('mySources.title')} → + +
+ ); + } return (
@@ -96,60 +90,13 @@ export default function TenderRadarSettingsPage() {

{t('settings.rssSectionTitle')}

-

+

{t('settings.rssSectionBody')}

- -
- -
-

- {t('settings.emailSectionTitle')} -

- {t('settings.emailSectionBody')} + {t('settings.rssSectionUserNote')}

- -
- -
-

- {t('settings.notificationsSectionTitle')} -

- - {isLoading ? ( -
- ) : ( -
- - -

- {t('settings.digestHelp')} -

-
- )} - - {saveSuccess && ( -

- {t('settings.saveSuccess')} -

- )} - {error &&

{error}

} +
); diff --git a/apps/web/src/messages/de.json b/apps/web/src/messages/de.json index f2f1e44..d20f690 100644 --- a/apps/web/src/messages/de.json +++ b/apps/web/src/messages/de.json @@ -681,6 +681,7 @@ "title": "Ausschreibungs-Radar", "loading": "Lädt…", "settingsTitle": "Einstellungen", + "mySourcesTitle": "Meine Quellen", "pollNow": "Jetzt abrufen", "pollNowTitle": "Fällige Quellen jetzt abrufen", "polling": "Wird abgerufen…", @@ -857,9 +858,8 @@ "title": "Ausschreibungs-Radar — Einstellungen", "rssSectionTitle": "RSS-Feeds", "rssSectionBody": "Öffentliche, plattformweite RSS-Quellen (z. B. service.bund.de oder eine subreport-elvis-Kommunalfeed) — gilt für alle Mandanten gleich, nicht pro Mandant konfigurierbar.", - "emailSectionTitle": "E-Mail-Alerts", - "emailSectionBody": "Postfach, in das Vergabeportale Ihre Benachrichtigungsmails schicken — pro Mandant konfigurierbar, getrennt vom DKV-Rechnungspostfach. Aus diesen Mails erkannte Ausschreibungen sind nur für Ihren Mandanten sichtbar.", - "notificationsSectionTitle": "Benachrichtigungen", + "rssSectionUserNote": "Persönliche Feeds legen Sie auf „Meine Quellen\" an.", + "accessDeniedText": "Diese Seite verwaltet plattformweite Einstellungen und ist Administratoren vorbehalten.", "digestIntervalLabel": "Digest-Intervall", "digestDaily": "Täglich", "digestWeekly": "Wöchentlich", diff --git a/apps/web/src/messages/en.json b/apps/web/src/messages/en.json index ec9d0df..46077d9 100644 --- a/apps/web/src/messages/en.json +++ b/apps/web/src/messages/en.json @@ -681,6 +681,7 @@ "title": "Tender Radar", "loading": "Loading…", "settingsTitle": "Settings", + "mySourcesTitle": "My sources", "pollNow": "Fetch now", "pollNowTitle": "Fetch due sources now", "polling": "Fetching…", @@ -857,9 +858,8 @@ "title": "Tender Radar — Settings", "rssSectionTitle": "RSS Feeds", "rssSectionBody": "Public, platform-wide RSS sources (e.g. service.bund.de or a subreport-elvis municipal feed) — applies equally to all tenants, not configurable per tenant.", - "emailSectionTitle": "Email Alerts", - "emailSectionBody": "Mailbox that tender portals send their notification emails to — configurable per tenant, separate from the DKV invoice mailbox. Tenders detected from these emails are only visible to your tenant.", - "notificationsSectionTitle": "Notifications", + "rssSectionUserNote": "Add personal feeds under \"My sources\".", + "accessDeniedText": "This page manages platform-wide settings and is reserved for administrators.", "digestIntervalLabel": "Digest Interval", "digestDaily": "Daily", "digestWeekly": "Weekly",