From 7b36582ef5aa6cf2ecc9bd1cc037407d48781bd3 Mon Sep 17 00:00:00 2001 From: Luca <102960244+Luca-Timo@users.noreply.github.com> Date: Wed, 3 Jun 2026 16:01:07 +0200 Subject: [PATCH] fix(crm): make 'Configure defaults in Settings' link navigate in-app The link was an doing a hard SPA boot in a new tab, which tripped the error boundary. Switch to a react-router so it opens Settings -> CRM the same way the sidebar nav does (known-good path). --- frontend/src/pages/admin/bills/BillEditorPage.tsx | 6 +++--- frontend/src/pages/admin/quotes/QuoteEditorPage.tsx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/pages/admin/bills/BillEditorPage.tsx b/frontend/src/pages/admin/bills/BillEditorPage.tsx index f20c22e0..81cfd8d3 100644 --- a/frontend/src/pages/admin/bills/BillEditorPage.tsx +++ b/frontend/src/pages/admin/bills/BillEditorPage.tsx @@ -5,7 +5,7 @@ */ import React, { useEffect, useMemo, useRef, useState } from 'react'; import { useTranslation } from 'react-i18next'; -import { useNavigate, useParams, useSearchParams } from 'react-router-dom'; +import { Link, useNavigate, useParams, useSearchParams } from 'react-router-dom'; import { useQuery, useQueryClient } from '@tanstack/react-query'; import { ArrowLeft, Eye, Save as SaveIcon } from 'lucide-react'; import { Button, Card, Loading, Input, LocalizedDateInput, TimeField } from '../../../components/common'; @@ -653,10 +653,10 @@ export const BillEditorPage: React.FC = () => { only has the single FK still resolve their preview text. */}

{t('bills.section.payment', 'Payment conditions')}

-
{t('common.configureInSettings', 'Configure defaults in Settings ↗')} - +
diff --git a/frontend/src/pages/admin/quotes/QuoteEditorPage.tsx b/frontend/src/pages/admin/quotes/QuoteEditorPage.tsx index 1b0fb26d..ea044fcb 100644 --- a/frontend/src/pages/admin/quotes/QuoteEditorPage.tsx +++ b/frontend/src/pages/admin/quotes/QuoteEditorPage.tsx @@ -13,7 +13,7 @@ */ import React, { useEffect, useMemo, useRef, useState } from 'react'; import { useTranslation } from 'react-i18next'; -import { useNavigate, useParams, useSearchParams } from 'react-router-dom'; +import { Link, useNavigate, useParams, useSearchParams } from 'react-router-dom'; import { useQuery, useQueryClient } from '@tanstack/react-query'; import { ArrowLeft, Eye, Send } from 'lucide-react'; import { Button, Card, Loading, Input, LocalizedDateInput, TimeField } from '../../../components/common'; @@ -536,10 +536,10 @@ export const QuoteEditorPage: React.FC = () => { below now reads from the timing template. */}

4. {t('quotes.section.payment', 'Payment conditions')}

- {t('common.configureInSettings', 'Configure defaults in Settings ↗')} - +