From bdc00fe2676924a68a837536e286417f928a5228 Mon Sep 17 00:00:00 2001 From: hamed <15238-genius.ha@users.noreply.drupalcode.org> Date: Mon, 27 Jul 2026 16:58:03 +0330 Subject: [PATCH] refactor: update UserDetailPage styles and introduce avatar gradient utility - Refactored role metadata styles in UserDetailPage for consistency with design tokens. - Replaced hardcoded avatar colors with a utility function to generate gradients based on user ID. - Improved InfoCard component styles for better hover effects and accessibility. - Removed deprecated color classes and adjusted background gradients for various components. - Updated theme token tests to reflect the removal of deferred files and ensure compliance with design standards. - Added new avatarColors utility file to manage avatar gradient definitions. --- .../components/schedule/ScheduleSection.tsx | 74 +++++++------- assets/admin/lib/avatarColors.ts | 15 +++ assets/admin/pages/DoctorDetailPage.tsx | 96 +++++++++---------- assets/admin/pages/UserDetailPage.tsx | 84 ++++++++-------- assets/admin/test/theme-tokens.test.ts | 21 ++-- docs/admin-ui/ui-design-spec.md | 10 +- 6 files changed, 153 insertions(+), 147 deletions(-) create mode 100644 assets/admin/lib/avatarColors.ts diff --git a/assets/admin/components/schedule/ScheduleSection.tsx b/assets/admin/components/schedule/ScheduleSection.tsx index a5692c65..80571180 100644 --- a/assets/admin/components/schedule/ScheduleSection.tsx +++ b/assets/admin/components/schedule/ScheduleSection.tsx @@ -169,7 +169,7 @@ function PersianDateInput({ value, onChange, minDate, placeholder }: {
{desc}
@@ -712,7 +712,7 @@ export function WeeklyScheduleTab({ doctorUuid, clinicUuid, addresses, readOnly نوع نوبتدهی ثبت شده و دیگر قابل تغییر نیست. ) : ( -+
⚠️ توجه: نوع نوبتدهی پس از اولین ثبت بههیچعنوان قابل تغییر نیست. پیش از ذخیره با دقت انتخاب کنید.
)} @@ -745,7 +745,7 @@ export function WeeklyScheduleTab({ doctorUuid, clinicUuid, addresses, readOnly {/* ─ نوبتدهی آنلاین */}