From d3266a0d1c458e8ae9c57ccd2f650e699544d2d6 Mon Sep 17 00:00:00 2001 From: Luca <102960244+Luca-Timo@users.noreply.github.com> Date: Tue, 16 Jun 2026 14:54:25 +0200 Subject: [PATCH] fix(crm): admin surfaces follow the admin light/dark toggle, not the gallery theme (#620) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CRM + accounting admin surfaces read gallery-theme tokens — the `text-theme`/`text-muted-theme` utility classes and raw `var(--color-surface| text|surface-border|elevated)` inline styles — which `ThemeContext` writes as inline `--color-*` on for every route. Those inline vars beat the admin `.dark` toggle, so e.g. the "Create passive customer" modal (#620) renders dark while the admin is in light mode (and the reverse). Repoint every CRM/accounting admin surface to Tailwind `dark:` classes so it tracks the admin toggle deterministically: - text-theme → text-neutral-900 dark:text-neutral-100; text-muted-theme → text-neutral-500 dark:text-neutral-400 (across the CRM list/detail/editor pages, hours, calendar, lineage, installments, CRM settings). - modal/dropdown/chip/divider inline `var(--color-surface*)` → bg-white dark:bg-neutral-900 / border-neutral-200 dark:border-neutral-700 etc. (CustomerManagement + CustomerDetail modals = the #620 fix). - toggle off-track surface-border → bg-neutral-300 dark:bg-neutral-600; brand accent ON-state kept (var(--color-accent)). - CalendarPage FullCalendar chrome: scope local --cal-* vars under .fc / .dark .fc so the calendar follows the admin toggle (was reading gallery vars). - PasswordResetModal bare neutrals + TaxReport Storno/Reissue badges gain dark pairings. Brand accent/primary tokens and the branded admin login are intentionally left on the gallery theme. The same leak exists in non-CRM admin areas (dashboard, events) — out of scope here. --- .../admin/CustomerAccountPicker.tsx | 25 ++-- .../components/admin/CustomerCrmPanels.tsx | 30 ++--- .../admin/CustomerDashboardBrandingCard.tsx | 4 +- .../components/admin/DocumentLineageCard.tsx | 12 +- .../admin/EditInstallmentPlanModal.tsx | 2 +- .../components/admin/InstallmentsPanel.tsx | 14 +-- .../components/admin/PasswordResetModal.tsx | 8 +- .../src/pages/admin/CustomerDetailPage.tsx | 118 +++++++++--------- .../pages/admin/CustomerManagementPage.tsx | 51 ++++---- .../src/pages/admin/bills/BillDetailPage.tsx | 2 +- .../src/pages/admin/bills/BillsListPage.tsx | 10 +- .../src/pages/admin/clients/CalendarPage.tsx | 31 +++-- .../admin/clients/CrmDevelopmentPage.tsx | 14 +-- .../clients/HourEntryDragCreateModal.tsx | 2 +- .../admin/clients/HourEntryInlinePopover.tsx | 4 +- .../pages/admin/clients/HoursLoggingPage.tsx | 24 ++-- .../src/pages/admin/clients/TaxReportPage.tsx | 4 +- .../admin/contracts/BlockLibraryPage.tsx | 10 +- .../admin/contracts/ContractDetailPage.tsx | 2 +- .../admin/contracts/ContractsListPage.tsx | 8 +- .../src/pages/admin/quotes/QuotesListPage.tsx | 8 +- .../pages/admin/settings/CrmSettingsPage.tsx | 2 +- .../settings/SettingsBusinessProfilePage.tsx | 4 +- 23 files changed, 192 insertions(+), 197 deletions(-) diff --git a/frontend/src/components/admin/CustomerAccountPicker.tsx b/frontend/src/components/admin/CustomerAccountPicker.tsx index 9dea5bce..9d2f710a 100644 --- a/frontend/src/components/admin/CustomerAccountPicker.tsx +++ b/frontend/src/components/admin/CustomerAccountPicker.tsx @@ -120,10 +120,10 @@ export const CustomerAccountPicker: React.FC = ({ value, onChange, disabl return (
-