fix(admin,sms,ui): resolve LTR input icon overlap, clarify melipayamak pulses credit and update UI texts
Deploy Canina / deploy (push) Successful in 3m51s
E2E Playwright Tests / Run Full E2E & Security Suites (push) Failing after 6s

This commit is contained in:
parsa aghaei committed 2026-09-05 09:09:36 +03:30
1 parent 52cc601345
commit 99e726b08b
18 files changed
+220 -390

No files matched your search

+18 -5
View File
@@ -690,14 +690,27 @@ export class SmsService {
});
}
// Mark current bindings
// Mark current bindings (both legacy bodyIds and dynamic scenario rules)
const result = Array.from(map.values()).map((p) => {
const assigned: string[] = [];
if (p.id === config.otpBodyId) assigned.push('کد تایید OTP');
if (p.id === config.orderBodyId) assigned.push('تایید سفارش');
if (p.id === config.shippingBodyId) assigned.push('کد رهگیری پست');
if (p.id === config.b2bBodyId) assigned.push('همکاران B2B');
if (p.id === config.petCareBodyId) assigned.push('یادآور سلامت پت');
if (p.id === config.orderBodyId) assigned.push('پترن پیش‌فرض سفارش');
if (p.id === config.shippingBodyId) assigned.push('پترن پیش‌فرض پست');
if (p.id === config.b2bBodyId) assigned.push('پترن پیش‌فرض B2B');
if (p.id === config.petCareBodyId) assigned.push('پترن پیش‌فرض یادآور پت');
// Check dynamic scenario rules
if (Array.isArray(config.rules)) {
for (const r of config.rules) {
if (Number(r.patternId) === p.id) {
const ruleTag = `سناریو: ${r.title}`;
if (!assigned.includes(ruleTag)) {
assigned.push(ruleTag);
}
}
}
}
return { ...p, assignedTo: assigned };
});
+12 -12
View File
@@ -123,15 +123,15 @@ export default function Login() {
<div>
<label className="block text-sm font-black text-gray-700">آدرس ایمیل ادمین</label>
<div className="mt-2 relative">
<div className="absolute inset-y-0 right-0 pl-3 flex items-center pr-3 pointer-events-none">
<Mail className="h-5 w-5 text-gray-400" />
<div className="absolute inset-y-0 right-0 pr-3.5 flex items-center pointer-events-none text-gray-400">
<Mail className="h-5 w-5" />
</div>
<input
type="email"
required
value={email}
onChange={(e) => setEmail(e.target.value)}
className="block w-full pl-3 pr-10 py-3 border border-gray-200 rounded-xl focus:ring-purple-500 focus:border-purple-500 sm:text-sm bg-gray-50 font-bold transition-all"
className="block w-full pr-11 pl-4 py-3 border border-gray-200 rounded-xl focus:ring-purple-500 focus:border-purple-500 sm:text-sm bg-gray-50 font-mono font-bold transition-all text-left"
placeholder="admin@canina.ir"
dir="ltr"
/>
@@ -141,15 +141,15 @@ export default function Login() {
<div>
<label className="block text-sm font-black text-gray-700">رمز عبور</label>
<div className="mt-2 relative">
<div className="absolute inset-y-0 right-0 pl-3 flex items-center pr-3 pointer-events-none">
<Lock className="h-5 w-5 text-gray-400" />
<div className="absolute inset-y-0 right-0 pr-3.5 flex items-center pointer-events-none text-gray-400">
<Lock className="h-5 w-5" />
</div>
<input
type="password"
required
value={password}
onChange={(e) => setPassword(e.target.value)}
className="block w-full pl-3 pr-10 py-3 border border-gray-200 rounded-xl focus:ring-purple-500 focus:border-purple-500 sm:text-sm bg-gray-50 font-bold transition-all text-left"
className="block w-full pr-11 pl-4 py-3 border border-gray-200 rounded-xl focus:ring-purple-500 focus:border-purple-500 sm:text-sm bg-gray-50 font-mono font-bold transition-all text-left"
placeholder="••••••••"
dir="ltr"
/>
@@ -174,15 +174,15 @@ export default function Login() {
<div>
<label className="block text-sm font-black text-gray-700">شماره تلفن همراه</label>
<div className="mt-2 relative">
<div className="absolute inset-y-0 right-0 pl-3 flex items-center pr-3 pointer-events-none">
<Phone className="h-5 w-5 text-gray-400" />
<div className="absolute inset-y-0 right-0 pr-3.5 flex items-center pointer-events-none text-gray-400">
<Phone className="h-5 w-5" />
</div>
<input
type="tel"
required
value={phoneNumber}
onChange={(e) => setPhoneNumber(e.target.value)}
className="block w-full pl-3 pr-10 py-3 border border-gray-200 rounded-xl focus:ring-purple-500 focus:border-purple-500 sm:text-sm bg-gray-50 font-bold transition-all text-left"
className="block w-full pr-11 pl-4 py-3 border border-gray-200 rounded-xl focus:ring-purple-500 focus:border-purple-500 sm:text-sm bg-gray-50 font-mono font-bold transition-all text-left"
placeholder="09123456789"
dir="ltr"
/>
@@ -212,8 +212,8 @@ export default function Login() {
</button>
</div>
<div className="mt-2 relative">
<div className="absolute inset-y-0 right-0 pl-3 flex items-center pr-3 pointer-events-none">
<KeyRound className="h-5 w-5 text-gray-400" />
<div className="absolute inset-y-0 right-0 pr-3.5 flex items-center pointer-events-none text-gray-400">
<KeyRound className="h-5 w-5" />
</div>
<input
type="text"
@@ -221,7 +221,7 @@ export default function Login() {
maxLength={6}
value={otpCode}
onChange={(e) => setOtpCode(e.target.value)}
className="block w-full pl-3 pr-10 py-3 border border-gray-200 rounded-xl focus:ring-purple-500 focus:border-purple-500 sm:text-sm bg-gray-50 font-bold transition-all text-center tracking-widest text-lg"
className="block w-full pr-11 pl-4 py-3 border border-gray-200 rounded-xl focus:ring-purple-500 focus:border-purple-500 sm:text-sm bg-gray-50 font-bold transition-all text-center tracking-widest text-lg"
placeholder="12345"
dir="ltr"
/>
@@ -354,14 +354,14 @@ export default function SmsSettingsPage() {
};
// Rule Handlers
const handleOpenAddRuleModal = () => {
const handleOpenAddRuleModal = (initialPatternId?: number, initialEvent?: string, initialTitle?: string) => {
setEditingRule(null);
setRuleFormTitle('');
setRuleFormEvent('ORDER_PAID');
setRuleFormTitle(initialTitle || '');
setRuleFormEvent(initialEvent || 'ORDER_PAID');
setRuleFormEnabled(true);
setRuleFormRecipientType('customer');
setRuleFormCustomPhone('');
setRuleFormPatternId(String(config.orderBodyId || ''));
setRuleFormPatternId(initialPatternId ? String(initialPatternId) : String(config.orderBodyId || ''));
setRuleFormVariables(['customerName', 'orderNumber', 'amount']);
setRuleFormDescription('');
setIsRuleModalOpen(true);
@@ -848,13 +848,14 @@ export default function SmsSettingsPage() {
value={config.password}
onChange={(e) => setConfig({ ...config, password: e.target.value })}
placeholder="••••••••••••"
className="w-full border border-gray-200 rounded-xl p-3 pr-10 outline-none focus:ring-2 focus:ring-purple-500 text-sm font-mono font-bold bg-white"
className="w-full border border-gray-200 rounded-xl p-3 pl-11 pr-4 outline-none focus:ring-2 focus:ring-purple-500 text-sm font-mono font-bold bg-white text-left"
dir="ltr"
/>
<button
type="button"
onClick={() => setShowPassword(!showPassword)}
className="absolute left-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 p-1"
className="absolute left-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 p-1 rounded-lg hover:bg-gray-100 transition-colors"
title={showPassword ? 'پنهان کردن رمز' : 'نمایش رمز'}
>
{showPassword ? <EyeOff className="w-4 h-4" /> : <Eye className="w-4 h-4" />}
</button>
@@ -1052,7 +1053,7 @@ export default function SmsSettingsPage() {
<div className="space-y-2">
<p className="text-xs text-white/70 font-medium">اعتبار باقی‌مانده در درگاه ملی پیامک:</p>
<div className="flex items-baseline gap-2">
<div className="space-y-1.5">
{isLoadingCredit ? (
<div className="flex items-center gap-2 py-1 text-amber-400 text-sm font-bold">
<Spinner size="sm" />
@@ -1060,10 +1061,20 @@ export default function SmsSettingsPage() {
</div>
) : credit !== null ? (
<>
<span className="text-3xl font-black text-amber-400 font-mono tracking-tight" dir="ltr">
{toPersianDigits(credit.toLocaleString())}
</span>
<span className="text-xs font-bold text-white/80">ریال / پالس</span>
<div className="flex items-baseline gap-2">
<span className="text-3xl font-black text-amber-400 font-mono tracking-tight" dir="ltr">
{toPersianDigits(Math.floor(credit).toLocaleString())}
</span>
<span className="text-xs font-bold text-white/90">پالس (تعداد پیامک قابل ارسال)</span>
</div>
<div className="flex items-center gap-2 text-[11px] text-amber-300/90 font-medium bg-amber-500/10 border border-amber-500/20 px-2.5 py-1.5 rounded-lg">
<svg className="w-3.5 h-3.5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 1118 0z" />
</svg>
<span>
معادل تقریبی: <strong className="font-bold font-mono text-white" dir="ltr">{toPersianDigits(Math.round(credit * 292.7).toLocaleString())}</strong> تومان موجودی کیف‌پول پنل
</span>
</div>
</>
) : (
<span className="text-sm font-bold text-rose-300">اطلاعات شارژ دریافت نشد</span>
@@ -1383,6 +1394,31 @@ export default function SmsSettingsPage() {
) : activeTab === 'patterns' ? (
/* Patterns Management Tab */
<div className="space-y-6">
{/* Guide Banner for Multi-Pattern Scenarios */}
<div className="bg-gradient-to-r from-purple-50 via-blue-50 to-indigo-50 p-4 sm:p-5 rounded-2xl border border-purple-200/80 shadow-xs flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4">
<div className="flex items-start gap-3">
<div className="w-10 h-10 rounded-xl bg-purple-600 text-white flex items-center justify-center shrink-0 shadow-sm mt-0.5">
<Zap className="w-5 h-5" />
</div>
<div>
<h4 className="text-sm font-black text-purple-950 font-vazir mb-1">
ارسال چند پیامک همزمان با الگوهای مختلف روی یک رویداد
</h4>
<p className="text-xs text-purple-800/90 leading-relaxed font-sans">
برای یک رویداد (مانند <strong>«تایید و ثبت سفارش»</strong>)، می‌توانید نامحدود الگوی پیامکی مجزا تعریف کنید: مثلاً یک پیامک به خریدار، یک پیامک اختصاصی به مدیر فروشگاه، و یک پیامک به شرکت حمل‌ونقل با شماره دلخواه! کافیست از دکمه <strong>«افزودن به سناریوها»</strong> در جلوی هر الگو استفاده نمایید.
</p>
</div>
</div>
<button
type="button"
onClick={() => setActiveTab('triggers')}
className="whitespace-nowrap px-3.5 py-2 bg-purple-600 hover:bg-purple-700 text-white rounded-xl text-xs font-bold transition-all shadow-sm shrink-0 flex items-center gap-1.5"
>
<span>مشاهده و مدیریت سناریوها</span>
<ArrowUpRight className="w-4 h-4" />
</button>
</div>
{/* Action Bar */}
<div className="bg-white p-4 rounded-2xl shadow-sm border border-gray-200 flex flex-col sm:flex-row items-center justify-between gap-4">
<div className="flex items-center gap-3">
@@ -1501,6 +1537,18 @@ export default function SmsSettingsPage() {
<td className="p-4 text-center">
<div className="flex items-center justify-center gap-1.5 flex-wrap">
<button
type="button"
onClick={() => {
handleOpenAddRuleModal(p.id, 'ORDER_PAID', `ارسال الگو ${p.id} - ${p.title}`);
}}
className="px-2.5 py-1.5 bg-purple-50 text-purple-700 hover:bg-purple-100 rounded-lg text-xs font-bold transition-colors border border-purple-200 flex items-center gap-1"
title="ایجاد سناریوی پیامک جدید با این الگو (مثلاً برای مشتری، مدیر، یا شرکت ارسال)"
>
<Plus className="w-3.5 h-3.5" />
<span>افزودن به سناریوها</span>
</button>
<select
onChange={(e) => {
if (e.target.value) {
@@ -1510,15 +1558,16 @@ export default function SmsSettingsPage() {
}}
defaultValue=""
className="text-[11px] font-bold bg-gray-50 border border-gray-200 rounded-lg p-1.5 text-gray-700 outline-none hover:border-purple-300"
title="تنظیم به عنوان الگوی پیش‌فرض سیستمی"
>
<option value="" disabled>
انتساب به رویداد...
الگوی پیش‌فرض...
</option>
<option value="otpBodyId">کد تایید OTP</option>
<option value="orderBodyId">تایید ثبت سفارش</option>
<option value="shippingBodyId">کد رهگیری پست</option>
<option value="b2bBodyId">درخواست همکار B2B</option>
<option value="petCareBodyId">یادآور پرونده سلامت پت</option>
<option value="otpBodyId">پیش‌فرض: کد تایید OTP</option>
<option value="orderBodyId">پیش‌فرض: تایید ثبت سفارش</option>
<option value="shippingBodyId">پیش‌فرض: کد رهگیری پست</option>
<option value="b2bBodyId">پیش‌فرض: درخواست همکار B2B</option>
<option value="petCareBodyId">پیش‌فرض: یادآور پرونده سلامت پت</option>
</select>
<button
+77 -326
View File
@@ -50,164 +50,7 @@ import RichTextEditor from '../components/ui/RichTextEditor';
import IconPickerModal, { ICON_REGISTRY } from '../components/ui/IconPickerModal';
import Button from '../components/ui/Button';
// Classic v1 Groupings (Backward Compatibility)
const V1_PAGE_TABS = [
{ id: 'all', label: 'همه بخش‌ها', icon: Layout },
{ id: 'hero', label: 'بنر اصلی (Hero)', icon: Sliders },
{ id: 'header', label: 'هدر و دکمه‌ها', icon: LinkIcon },
{ id: 'advisor', label: 'دستیار سلامت', icon: HelpCircle },
{ id: 'videos', label: 'ویدئوها & CTA', icon: FileText },
{ id: 'footer', label: 'فوتور و ارتباطات', icon: Languages },
];
const V1_GROUPS: Record<string, string[]> = {
'تنظیمات کاتالوگ‌مود و حالت صیانت': [
'maintenance_mode',
'maintenance_title',
'maintenance_desc',
'maintenance_eta',
'maintenance_contact_phone',
'maintenance_badge',
'catalog_mode',
'catalog_hide_prices',
'catalog_disable_cart',
'catalog_disable_checkout',
],
'هدر و ناوبری': [
'shipping_notice',
'brand_name_fa',
'brand_subtitle',
'nav_solutions',
'nav_products',
'nav_wiki',
'nav_blog',
'nav_pet_profiles',
'nav_search_placeholder',
'nav_search_button',
'nav_pet_switcher_title',
'nav_register_pet',
'nav_wallet_orders',
'nav_logout',
'nav_login',
'nav_cart',
],
'بنر اصلی (Hero)': [
'hero_badge',
'hero_title',
'hero_desc',
'hero_btn_advisor',
'hero_btn_products',
'hero_image_badge',
'hero_image_title',
'hero_quality_standard',
'hero_image_url',
'hero_stat_founded',
'hero_stat_agencies',
'hero_stat_german_formula',
],
'دستیار سلامت': [
'advisor_badge',
'advisor_title',
'advisor_subtitle',
'advisor_step1_title',
'advisor_step1_desc',
'advisor_pet_name_label',
'advisor_pet_name_placeholder',
'advisor_pet_breed_label',
'advisor_pet_breed_placeholder',
'advisor_submit_btn',
'advisor_validation_warning',
'advisor_step2_title',
'advisor_step2_desc',
'advisor_age_label',
'advisor_weight_label',
'advisor_activity_label',
'advisor_back',
'advisor_next_final',
'advisor_step3_title',
'advisor_step3_desc',
'advisor_complete',
],
'محصولات برگزیده': [
'featured_badge',
'featured_title_line1',
'featured_title_line2',
'featured_desc',
'featured_view_all',
'product_view_details',
'featured_no_products_title',
'featured_no_products_desc',
],
'ویدئوها': [
'videos_badge',
'videos_title',
'videos_title_highlight',
'videos_desc',
'videos_view_all',
],
'کارت‌های ناوبری': [
'nav_card_shop_title',
'nav_card_shop_desc',
'nav_card_shop_cta',
'nav_card_wiki_title',
'nav_card_wiki_desc',
'nav_card_wiki_cta',
],
'درباره ما': [
'about_label',
'about_title',
'about_item1_title',
'about_item1_desc',
'about_item2_title',
'about_item2_desc',
'about_item3_title',
'about_item3_desc',
],
'CTA': [
'cta_title',
'cta_desc',
'cta_btn_primary',
'cta_btn_secondary',
],
'فوتر': [
'footer_brand_title',
'footer_brand_subtitle',
'footer_brand_desc',
'footer_links_title',
'footer_link_products',
'footer_link_blog',
'footer_link_profiles',
'footer_link_wiki',
'footer_link_b2b',
'footer_contact_title',
'footer_phone_label',
'footer_phone',
'footer_email_label',
'footer_email',
'footer_address_label',
'footer_address',
'footer_auth_title',
'footer_auth_desc',
'footer_auth_badge',
'footer_copyright',
'footer_about',
'footer_contact',
'footer_privacy',
],
};
const V1_GROUP_PAGE_MAP: Record<string, string> = {
'بنر اصلی (Hero)': 'hero',
'هدر و ناوبری': 'header',
'دستیار سلامت': 'advisor',
'ویدئوها': 'videos',
'CTA': 'videos',
'کارت‌های ناوبری': 'hero',
'فوتر': 'footer',
};
// Structured Page Builder v2 Definitions
// Structured Page Builder Definitions
interface SectionField {
key: string;
label: string;
@@ -297,6 +140,25 @@ const SITE_PAGES: AppSitePage[] = [
{ key: 'hero_stat_german_formula', label: 'آمار فرمولاسیون آلمانی', type: 'text' },
],
},
{
id: 'smart_advisor',
title: 'مشاور و تجویز هوشمند (Smart Advisor)',
icon: Sparkles,
fields: [
{ key: 'advisor_badge', label: 'بج بالای بخش مشاور', type: 'text' },
{ key: 'advisor_title', label: 'عنوان اصلی مشاور سلامت (H2)', type: 'rich-text' },
{ key: 'advisor_subtitle', label: 'متن توضیحات راهنمای ۴ قدمه', type: 'rich-text' },
{ key: 'advisor_card1_title', label: 'عنوان کارت ۱ (چرا ثبت شناسنامه؟)', type: 'text' },
{ key: 'advisor_card1_desc', label: 'متن کارت ۱ (دوز دقیق و فرمول غلیظ)', type: 'rich-text' },
{ key: 'advisor_card1_footer', label: 'برچسب پایین کارت ۱', type: 'text' },
{ key: 'advisor_card2_title', label: 'عنوان کارت ۲ (تطبیق علائم بالینی)', type: 'text' },
{ key: 'advisor_card2_desc', label: 'متن کارت ۲ (تطبیق علائم مثل لنگیدن و ریزش مو)', type: 'rich-text' },
{ key: 'advisor_card2_footer', label: 'برچسب پایین کارت ۲', type: 'text' },
{ key: 'advisor_card3_title', label: 'عنوان کارت ۳ (پایش موجودی و یادآور)', type: 'text' },
{ key: 'advisor_card3_desc', label: 'متن کارت ۳ (تنظیم زمان مصرف و هشدار شارژ)', type: 'rich-text' },
{ key: 'advisor_card3_footer', label: 'برچسب پایین کارت ۳', type: 'text' },
],
},
{
id: 'featured',
title: 'محصولات برگزیده (Featured Products)',
@@ -307,6 +169,8 @@ const SITE_PAGES: AppSitePage[] = [
{ key: 'featured_title_line2', label: 'عنوان سطر دوم محصولات برگزیده', type: 'rich-text' },
{ key: 'featured_desc', label: 'توضیحات معرفی مکمل‌ها', type: 'rich-text' },
{ key: 'featured_view_all', label: 'متن دکمه مشاهده همه محصولات', type: 'text' },
{ key: 'featured_no_products_title', label: 'عنوان در صورت عدم وجود محصول', type: 'text' },
{ key: 'featured_no_products_desc', label: 'متن توضیح عدم وجود محصول', type: 'text' },
],
},
{
@@ -341,12 +205,52 @@ const SITE_PAGES: AppSitePage[] = [
fields: [
{ key: 'about_label', label: 'برچسب بالای بخش', type: 'text' },
{ key: 'about_title', label: 'عنوان اصلی درباره کنینا', type: 'rich-text' },
{ key: 'about_item1_title', label: 'عنوان ویژگی اول (استاندارد دارویی)', type: 'text' },
{ key: 'about_image_url', label: 'تصویر آزمایشگاه و معرفی برند', type: 'image' },
{ key: 'about_image_alt', label: 'متن جایگزین (Alt) تصویر درباره برند', type: 'text' },
{ key: 'about_badge_title', label: 'عنوان بج روی تصویر (پیش‌فرض: کیفیت)', type: 'text' },
{ key: 'about_badge_subtitle', label: 'زیرعنوان بج روی تصویر (پیش‌فرض: استانداردهای فوق‌دارویی)', type: 'text' },
{ key: 'about_item1_title', label: 'عنوان ویژگی اول (مواد اولیه نایاب)', type: 'text' },
{ key: 'about_item1_desc', label: 'توضیحات ویژگی اول', type: 'rich-text' },
{ key: 'about_item2_title', label: 'عنوان ویژگی دوم (فرمولاسیون تخصصی)', type: 'text' },
{ key: 'about_item1_footnote', label: 'پاورقی ویژگی اول (استاندارد انسانی)', type: 'text' },
{ key: 'about_item2_title', label: 'عنوان ویژگی دوم (فاقد مواد نگهدارنده)', type: 'text' },
{ key: 'about_item2_desc', label: 'توضیحات ویژگی دوم', type: 'rich-text' },
{ key: 'about_item3_title', label: 'عنوان ویژگی سوم (تاییدیه دامپزشکان)', type: 'text' },
{ key: 'about_item3_title', label: 'عنوان ویژگی سوم (تاییدیه اروپا)', type: 'text' },
{ key: 'about_item3_desc', label: 'توضیحات ویژگی سوم', type: 'rich-text' },
{ key: 'about_item3_footnote', label: 'پاورقی ویژگی سوم (استانداردهای HACCP & IFS)', type: 'text' },
],
},
{
id: 'testimonials',
title: 'نظرات دامپزشکان و مشتریان (Testimonials)',
icon: Award,
fields: [
{ key: 'testimonials_badge', label: 'بج بالای بخش نظرات', type: 'text' },
{ key: 'testimonials_title_1', label: 'بخش اول عنوان نظرات', type: 'text' },
{ key: 'testimonials_title_2', label: 'بخش رنگی عنوان نظرات', type: 'text' },
{ key: 'testimonials_desc', label: 'توضیحات معرفی بخش نظرات', type: 'rich-text' },
],
},
{
id: 'blog_preview',
title: 'پیش‌نمایش مقالات وبلاگ (Blog Preview)',
icon: FileText,
fields: [
{ key: 'blog_preview_badge', label: 'بج بالای مقالات وبلاگ', type: 'text' },
{ key: 'blog_preview_title', label: 'بخش اول عنوان مقالات', type: 'text' },
{ key: 'blog_preview_title_highlight', label: 'بخش هایلایت عنوان مقالات', type: 'text' },
{ key: 'blog_preview_desc', label: 'توضیحات کوتاه زیر عنوان مقالات', type: 'rich-text' },
{ key: 'blog_preview_view_all', label: 'متن دکمه مشاهده همه مقالات', type: 'text' },
],
},
{
id: 'faq',
title: 'سوالات متداول (FAQ Section)',
icon: HelpCircle,
fields: [
{ key: 'faq_badge', label: 'بج بالای سوالات متداول', type: 'text' },
{ key: 'faq_title_1', label: 'بخش اول تیتر سوالات متداول', type: 'text' },
{ key: 'faq_title_2', label: 'بخش رنگی تیتر سوالات متداول', type: 'text' },
{ key: 'faq_desc', label: 'توضیحات کوتاه زیر تیتر', type: 'rich-text' },
],
},
{
@@ -356,8 +260,8 @@ const SITE_PAGES: AppSitePage[] = [
fields: [
{ key: 'cta_title', label: 'عنوان اصلی کادر دعوت به خرید (H2)', type: 'rich-text' },
{ key: 'cta_desc', label: 'متن توضیحات و ترغیب', type: 'rich-text' },
{ key: 'cta_btn_primary', label: 'متن دکمه اصلی (خرید مکمل)', type: 'text' },
{ key: 'cta_btn_secondary', label: 'متن دکمه ثانویه (مشاوره دامپزشک)', type: 'text' },
{ key: 'cta_btn_primary', label: 'متن دکمه اصلی (دریافت رژیم مکمل رایگان)', type: 'text' },
{ key: 'cta_btn_secondary', label: 'متن دکمه ثانویه (پروانه دامپزشکی و اصالت کالا)', type: 'text' },
],
},
],
@@ -374,11 +278,13 @@ const SITE_PAGES: AppSitePage[] = [
title: 'هدر و فیلترهای فروشگاه',
icon: Sliders,
fields: [
{ key: 'shop_page_title', label: 'عنوان صفحه فروشگاه (H1)', type: 'rich-text' },
{ key: 'shop_page_desc', label: 'توضیحات سئو بالای فروشگاه', type: 'rich-text' },
{ key: 'shop_filter_categories', label: 'عنوان فیلتر دسته‌بندی‌ها', type: 'text' },
{ key: 'shop_filter_price', label: 'عنوان فیلتر محدوده قیمت', type: 'text' },
{ key: 'shop_search_placeholder', label: 'متن کادر جستجوی محصولات', type: 'text' },
{ key: 'shop_catalog_title', label: 'تیتر بالای لیست محصولات (پیش‌فرض: کاتولوگ دارویی Canina - پاک کنید تا پنهان شود)', type: 'rich-text' },
{ key: 'shop_filter_title', label: 'عنوان سایدبار فیلترها (پیش‌فرض: فیلترهای تخصصی)', type: 'text' },
{ key: 'shop_filter_pet_type', label: 'عنوان فیلتر نوع پت', type: 'text' },
{ key: 'shop_filter_solutions', label: 'عنوان فیلتر راهکار درمانی', type: 'text' },
{ key: 'shop_search_placeholder', label: 'متن کادر جستجوی محصول', type: 'text' },
{ key: 'shop_promo_card_title', label: 'عنوان کارت بنفش سایدبار (مشاوره رایگان)', type: 'text' },
{ key: 'shop_promo_card_desc', label: 'متن کارت بنفش سایدبار', type: 'rich-text' },
],
},
],
@@ -678,7 +584,6 @@ const SHARED_FOOTER_FIELDS: SectionField[] = [
export default function UITexts() {
const [searchParams, setSearchParams] = useSearchParams();
const [versionTab, setVersionTabState] = useState<'v2' | 'v1'>(() => (searchParams.get('version') as 'v2' | 'v1') || 'v2');
const [v2SubTab, setV2SubTabState] = useState<'header' | 'footer' | 'pages'>(() => (searchParams.get('subTab') as 'header' | 'footer' | 'pages') || 'pages');
const [openPageId, setOpenPageIdState] = useState<string>(() => searchParams.get('pageId') || 'home');
const [openSectionId, setOpenSectionIdState] = useState<string>(() => searchParams.get('sectionId') || 'seo');
@@ -694,11 +599,6 @@ export default function UITexts() {
setSearchParams(cleaned, { replace: true });
};
const setVersionTab = (v: 'v2' | 'v1') => {
setVersionTabState(v);
updateUrlState({ version: v === 'v2' ? null : v });
};
const setV2SubTab = (t: 'header' | 'footer' | 'pages') => {
setV2SubTabState(t);
updateUrlState({ subTab: t === 'pages' ? null : t });
@@ -717,7 +617,6 @@ export default function UITexts() {
// State
const [texts, setTexts] = useState<Record<string, string>>({});
const [edits, setEdits] = useState<Record<string, string>>({});
const [search, setSearch] = useState('');
const [savingKey, setSavingKey] = useState<string | null>(null);
const [savedKey, setSavedKey] = useState<string | null>(null);
const [loading, setLoading] = useState(true);
@@ -738,13 +637,6 @@ export default function UITexts() {
updateUrlState({ iconKey: k });
};
// Legacy v1 State
const [v1ActiveTab, setV1ActiveTabState] = useState(() => searchParams.get('v1Tab') || 'all');
const setV1ActiveTab = (tab: string) => {
setV1ActiveTabState(tab);
updateUrlState({ v1Tab: tab === 'all' ? null : tab });
};
useEffect(() => {
let isSubscribed = true;
@@ -1014,43 +906,8 @@ export default function UITexts() {
</div>
</div>
{/* Main Version Switcher: v2 (New Structure) vs v1 (Legacy) */}
<div className="flex items-center justify-between bg-white p-2 rounded-2xl border border-gray-200 shadow-xs">
<div className="flex items-center gap-2">
<button
type="button"
onClick={() => setVersionTab('v2')}
className={`px-5 py-2.5 rounded-xl text-xs font-black transition-all flex items-center gap-2 cursor-pointer ${
versionTab === 'v2'
? 'bg-gradient-to-r from-purple-600 to-indigo-600 text-white shadow-md shadow-purple-200'
: 'text-gray-600 hover:bg-gray-100'
}`}
>
<Sparkles className="w-4 h-4 text-amber-300" />
<span>ویرایشگر پیشرفته صفحات ({SITE_PAGES.length} صفحه فعال)</span>
</button>
<button
type="button"
onClick={() => setVersionTab('v1')}
className={`px-4 py-2.5 rounded-xl text-xs font-bold transition-all flex items-center gap-2 cursor-pointer ${
versionTab === 'v1'
? 'bg-gray-800 text-white shadow-sm'
: 'text-gray-500 hover:bg-gray-100'
}`}
>
<span>نمای کلاسیک (v1 Legacy)</span>
</button>
</div>
<div className="text-[11px] text-gray-400 font-bold px-3">
{versionTab === 'v2' ? 'نسخه مدرن آکاردئونی تفکیک‌شده به همراه Google SERP' : 'نسخه پشتیبان فهرستی'}
</div>
</div>
{versionTab === 'v2' ? (
<div className="space-y-6">
{/* Modern Page Builder Interface */}
<div className="space-y-6">
{/* Sub Tabs: Header, Footer, Site Pages */}
<div className="flex items-center gap-2 bg-white p-2 rounded-2xl border border-gray-200 shadow-xs overflow-x-auto no-scrollbar">
<button
@@ -1400,113 +1257,7 @@ export default function UITexts() {
})}
</div>
)}
</div>
) : (
/* Legacy v1 Interface */
<div className="space-y-6">
{/* Search */}
<div className="bg-white p-4 rounded-2xl border border-gray-200 shadow-xs flex items-center gap-3">
<Search className="w-5 h-5 text-gray-400 shrink-0" />
<input
type="text"
placeholder="جستجو در متون نسخه ۱..."
value={search}
onChange={(e) => setSearch(e.target.value)}
className="w-full bg-transparent border-none text-xs focus:outline-none font-bold"
/>
</div>
{/* Section Tabs v1 */}
<div className="flex items-center gap-2 overflow-x-auto pb-2 no-scrollbar">
{V1_PAGE_TABS.map((tab) => {
const Icon = tab.icon;
const isActive = v1ActiveTab === tab.id;
return (
<button
key={tab.id}
onClick={() => setV1ActiveTab(tab.id)}
className={`px-4 py-2.5 rounded-xl text-xs font-black transition-all shrink-0 flex items-center gap-2 border cursor-pointer ${
isActive
? 'bg-purple-600 text-white border-purple-600 shadow-md'
: 'bg-white text-gray-700 border-gray-200 hover:bg-gray-50'
}`}
>
<Icon className="w-4 h-4" />
<span>{tab.label}</span>
</button>
);
})}
</div>
{/* Content Groups v1 */}
<div className="space-y-6">
{Object.entries(V1_GROUPS).map(([groupTitle, keys]) => {
const mappedTab = V1_GROUP_PAGE_MAP[groupTitle] || 'other';
if (v1ActiveTab !== 'all' && mappedTab !== v1ActiveTab) return null;
const filteredKeys = keys.filter((key) => {
if (!search) return true;
const currentVal = edits[key] ?? texts[key] ?? '';
return key.toLowerCase().includes(search.toLowerCase()) || currentVal.includes(search);
});
if (filteredKeys.length === 0) return null;
return (
<div
key={groupTitle}
className="bg-white rounded-3xl border border-gray-200 p-6 space-y-4 shadow-xs"
>
<h3 className="text-base font-black text-gray-900 border-b border-gray-100 pb-3 flex items-center gap-2">
<span className="w-2.5 h-2.5 rounded-full bg-purple-600 inline-block" />
{groupTitle}
</h3>
<div className="grid gap-4 md:grid-cols-2">
{filteredKeys.map((key) => {
const val = edits[key] ?? texts[key] ?? '';
const isImg = isImageKey(key);
return (
<div key={key} className="space-y-2 p-4 bg-gray-50/70 rounded-2xl border border-gray-100">
<label className="text-[11px] font-mono text-purple-700 font-bold block" dir="ltr">
{key}
</label>
<div className="flex items-center gap-2">
{val.length > 60 && !isImg ? (
<textarea
value={val}
onChange={(e) => setEdits({ ...edits, [key]: e.target.value })}
className="w-full bg-white border border-gray-200 rounded-xl p-3 text-xs font-bold text-gray-900 focus:outline-none focus:ring-2 focus:ring-purple-500/20 h-20"
/>
) : (
<input
type="text"
value={val}
onChange={(e) => setEdits({ ...edits, [key]: e.target.value })}
className="w-full bg-white border border-gray-200 rounded-xl px-3 py-2 text-xs font-bold text-gray-900 focus:outline-none focus:ring-2 focus:ring-purple-500/20"
/>
)}
<button
type="button"
onClick={() => handleSave(key)}
className="px-3.5 py-2 bg-purple-600 text-white hover:bg-purple-700 rounded-xl text-xs font-black transition-all shrink-0 shadow-xs cursor-pointer"
>
ذخیره
</button>
</div>
</div>
);
})}
</div>
</div>
);
})}
</div>
</div>
)}
</div>
{/* Media Selector Modal */}
{mediaSelectorKey && (
+6 -6
View File
@@ -579,14 +579,14 @@ export default function Users() {
شماره موبایل <span className="text-red-500">*</span>
</label>
<div className="relative">
<Phone className="w-4 h-4 text-gray-400 absolute right-3 top-1/2 -translate-y-1/2" />
<Phone className="w-4 h-4 text-gray-400 absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none" />
<input
type="tel"
required
placeholder="09123456789"
value={createFormData.mobile}
onChange={(e) => setCreateFormData({ ...createFormData, mobile: e.target.value })}
className="w-full pl-3 pr-9 py-2.5 rounded-xl border border-gray-200 focus:border-purple-500 outline-none font-mono text-left"
className="w-full pl-3.5 pr-10 py-2.5 rounded-xl border border-gray-200 focus:border-purple-500 outline-none font-mono text-left"
dir="ltr"
/>
</div>
@@ -595,13 +595,13 @@ export default function Users() {
<div>
<label className="block text-gray-700 font-bold mb-1">ایمیل (اختیاری)</label>
<div className="relative">
<Mail className="w-4 h-4 text-gray-400 absolute right-3 top-1/2 -translate-y-1/2" />
<Mail className="w-4 h-4 text-gray-400 absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none" />
<input
type="email"
placeholder="user@example.com"
value={createFormData.email}
onChange={(e) => setCreateFormData({ ...createFormData, email: e.target.value })}
className="w-full pl-3 pr-9 py-2.5 rounded-xl border border-gray-200 focus:border-purple-500 outline-none font-mono text-left"
className="w-full pl-3.5 pr-10 py-2.5 rounded-xl border border-gray-200 focus:border-purple-500 outline-none font-mono text-left"
dir="ltr"
/>
</div>
@@ -610,13 +610,13 @@ export default function Users() {
<div>
<label className="block text-gray-700 font-bold mb-1">رمز عبور (اختیاری)</label>
<div className="relative">
<Lock className="w-4 h-4 text-gray-400 absolute right-3 top-1/2 -translate-y-1/2" />
<Lock className="w-4 h-4 text-gray-400 absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none" />
<input
type="password"
placeholder="حداقل ۶ کاراکتر"
value={createFormData.password}
onChange={(e) => setCreateFormData({ ...createFormData, password: e.target.value })}
className="w-full pl-3 pr-9 py-2.5 rounded-xl border border-gray-200 focus:border-purple-500 outline-none text-left"
className="w-full pl-3.5 pr-10 py-2.5 rounded-xl border border-gray-200 focus:border-purple-500 outline-none font-mono text-left"
dir="ltr"
/>
</div>
+7 -7
View File
@@ -117,16 +117,16 @@ export default function HomeClient({ initialData }: HomeClientProps) {
<div className="relative overflow-hidden rounded-2xl sm:rounded-[3rem]">
<div className="absolute -top-10 -right-10 w-40 h-40 bg-canina-blue/5 rounded-full blur-3xl" />
<Image
src="/assets/images/regenerated_image_1779109861747.png"
alt="آزمایشگاه تخصصی تولید مکمل‌های دارویی کنینا آلمان"
className="rounded-2xl sm:rounded-[3rem] shadow-2xl relative z-10 grayscale-[10%] w-full"
src={getText('about_image_url', "/assets/images/regenerated_image_1779109861747.png")}
alt={getText('about_image_alt', "آزمایشگاه تخصصی تولید مکمل‌های دارویی کنینا آلمان")}
className="rounded-2xl sm:rounded-[3rem] shadow-2xl relative z-10 grayscale-[10%] w-full object-cover"
width={640}
height={425}
loading="lazy"
/>
<div className="absolute bottom-3 left-3 sm:bottom-6 sm:left-6 bg-canina-blue text-white p-3 sm:p-6 md:p-8 rounded-xl sm:rounded-[2rem] shadow-2xl z-20 max-w-[85%] sm:max-w-[80%] border border-white/10">
<div className="text-xl sm:text-4xl font-black mb-0.5 sm:mb-1 font-lalezar tracking-wide">{getText('quality', "کیفیت")}</div>
<div className="text-[9px] sm:text-xs uppercase tracking-widest font-bold opacity-90 font-vazir">{getText('ultra_pharmaceutical', "استانداردهای فوق‌دارویی")}</div>
<div className="text-xl sm:text-4xl font-black mb-0.5 sm:mb-1 font-lalezar tracking-wide">{getText('about_badge_title', getText('quality', "کیفیت"))}</div>
<div className="text-[9px] sm:text-xs uppercase tracking-widest font-bold opacity-90 font-vazir">{getText('about_badge_subtitle', getText('ultra_pharmaceutical', "استانداردهای فوق‌دارویی"))}</div>
</div>
</div>
<div>
@@ -151,12 +151,12 @@ export default function HomeClient({ initialData }: HomeClientProps) {
<p className="text-sm text-slate-700 leading-relaxed font-medium font-sans">{item.desc}</p>
{idx === 0 && (
<span className="text-[10px] text-slate-600 mt-1 block font-medium">
* تهیه شده با بالاترین استانداردهای دارویی انسان - کاملاً بی‌خطر در صورت لیسیده شدن توسط حیوان.
{getText('about_item1_footnote', "* تهیه شده با بالاترین استانداردهای دارویی انسان - کاملاً بی‌خطر در صورت لیسیده شدن توسط حیوان.")}
</span>
)}
{idx === 2 && (
<span className="text-[10px] text-slate-600 mt-1 block font-medium">
* تاییدیه رسمی ایمنی مواد غذایی و دارویی (HACCP & IFS) از اتحادیه اروپا.
{getText('about_item3_footnote', "* تاییدیه رسمی ایمنی مواد غذایی و دارویی (HACCP & IFS) از اتحادیه اروپا.")}
</span>
)}
</div>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 15 KiB

+4 -1
View File
@@ -12,7 +12,10 @@ import { HomeApiResponse } from "../lib/types";
async function getHomeData(): Promise<HomeApiResponse | null> {
try {
const apiUrl = process.env.INTERNAL_API_URL || process.env.NEXT_PUBLIC_API_URL || 'http://localhost:4001/api';
const apiUrl =
process.env.INTERNAL_API_URL ||
process.env.NEXT_PUBLIC_API_URL ||
(process.env.NODE_ENV === 'production' ? 'https://api.canina.ir/api' : 'http://127.0.0.1:4400/api');
const res = await fetch(`${apiUrl}/home`, {
next: { revalidate: 3600, tags: ['home-data'] },
});
@@ -439,7 +439,7 @@ export default function ArchivePage({
<div className="flex items-center justify-between mb-6">
<div className="flex items-center gap-2">
<Filter className="w-5 h-5 text-canina-blue" />
<h3 className="font-black text-medical-gray-900">فیلترهای تخصصی</h3>
<h3 className="font-black text-medical-gray-900">{getText('shop_filter_title', 'فیلترهای تخصصی')}</h3>
</div>
<button
onClick={() => setIsMobileFilterOpen(false)}
@@ -452,7 +452,7 @@ export default function ArchivePage({
<div className="space-y-6">
{/* Pet Type */}
<div>
<span className="text-[10px] font-black text-medical-gray-400 uppercase tracking-widest block mb-3">نوع پت</span>
<span className="text-[10px] font-black text-medical-gray-400 uppercase tracking-widest block mb-3">{getText('shop_filter_pet_type', 'نوع پت')}</span>
<div className="grid grid-cols-3 gap-2">
{[
{ id: "all", label: "هر دو", icon: <Activity className="w-3 h-3" /> },
@@ -473,7 +473,7 @@ export default function ArchivePage({
{/* Solutions */}
<div>
<span className="text-[10px] font-black text-medical-gray-400 uppercase tracking-widest block mb-3">راهکار درمانی</span>
<span className="text-[10px] font-black text-medical-gray-400 uppercase tracking-widest block mb-3">{getText('shop_filter_solutions', 'راهکار درمانی')}</span>
<div className="flex flex-col gap-2">
{categories.map(cat => (
<button
@@ -535,8 +535,8 @@ export default function ArchivePage({
{/* Promo Card */}
<div className="bg-medical-gray-900 rounded-[2rem] p-6 text-white relative overflow-hidden group">
<div className="absolute -top-10 -left-10 w-32 h-32 bg-canina-blue rounded-full blur-3xl opacity-20 group-hover:opacity-40 transition-opacity" />
<h4 className="text-lg font-black italic mb-4 relative z-10 underline decoration-canina-blue underline-offset-8">مشاوره رایگان</h4>
<p className="text-xs text-white/60 leading-relaxed mb-6 relative z-10">اگر نمی‌دانید کدام ترکیب برای پت شما مناسب است، همین حالا با دامپزشکان ما تماس بگیرید.</p>
<h4 className="text-lg font-black italic mb-4 relative z-10 underline decoration-canina-blue underline-offset-8">{getText('shop_promo_card_title', 'مشاوره رایگان')}</h4>
<p className="text-xs text-white/60 leading-relaxed mb-6 relative z-10">{getText('shop_promo_card_desc', 'اگر نمی‌دانید کدام ترکیب برای پت شما مناسب است، همین حالا با دامپزشکان ما تماس بگیرید.')}</p>
<a
href={getText('contact_phone_link', `tel:${getText('contact_phone', '02188884444').replace(/[^0-9+]/g, '')}`)}
className="w-full bg-white text-medical-gray-900 py-3 rounded-xl text-xs font-black hover:scale-105 transition-transform relative z-10 flex items-center justify-center font-vazir"
@@ -549,7 +549,14 @@ export default function ArchivePage({
{/* Main Content */}
<main className="flex-1 relative">
<div className="flex flex-col sm:flex-row items-center justify-between mb-6 gap-4">
<h2 className="text-3xl font-black text-medical-gray-900">کاتولوگ دارویی <span className="text-canina-blue">Canina</span></h2>
{getText('shop_catalog_title', 'کاتولوگ دارویی Canina') ? (
<h2
className="text-3xl font-black text-medical-gray-900"
dangerouslySetInnerHTML={{
__html: getText('shop_catalog_title', 'کاتولوگ دارویی <span class="text-canina-blue">Canina</span>')
}}
/>
) : null}
<div className="flex flex-wrap sm:flex-nowrap items-center gap-3 w-full sm:w-auto">
{/* Sort Dropdown */}
@@ -252,15 +252,17 @@ export default function SmartAdvisor({ onComplete, rules = [] }: SmartAdvisorPro
<div className="w-9 h-9 sm:w-12 sm:h-12 bg-canina-blue/10 rounded-xl sm:rounded-2xl flex items-center justify-center text-canina-blue sm:mb-4 group-hover:bg-canina-blue group-hover:text-white transition-all shadow-sm flex-shrink-0">
<Pill className="w-5 h-5 sm:w-6 sm:h-6" />
</div>
<h3 className="text-base sm:text-lg font-black text-medical-gray-900 sm:mb-2 font-vazir">چرا ثبت شناسنامه؟</h3>
<h3 className="text-base sm:text-lg font-black text-medical-gray-900 sm:mb-2 font-vazir">
{getText('advisor_card1_title', 'چرا ثبت شناسنامه؟')}
</h3>
</div>
<p className="text-xs text-medical-gray-500 font-medium leading-relaxed font-vazir">
مکمل‌های دارویی کنینا غلیظ و تخصصی هستند؛ الگوریتم هوشمند ما بر اساس سن، وزن و جثه پت شما، دوز دقیق مصرفی روزانه را محاسبه می‌کند.
{getText('advisor_card1_desc', 'مکمل‌های دارویی کنینا غلیظ و تخصصی هستند؛ الگوریتم هوشمند ما بر اساس سن، وزن و جثه پت شما، دوز دقیق مصرفی روزانه را محاسبه می‌کند.')}
</p>
</div>
<div className="mt-3 sm:mt-4 pt-3 sm:pt-4 border-t border-medical-gray-100 text-[10px] font-black text-canina-blue flex items-center gap-1 font-vazir">
<Check className="w-3.5 h-3.5" />
تضمین ایمنی و عدم اوردوز
{getText('advisor_card1_footer', 'تضمین ایمنی و عدم اوردوز')}
</div>
</div>
@@ -270,15 +272,17 @@ export default function SmartAdvisor({ onComplete, rules = [] }: SmartAdvisorPro
<div className="w-9 h-9 sm:w-12 sm:h-12 bg-canina-blue/10 rounded-xl sm:rounded-2xl flex items-center justify-center text-canina-blue sm:mb-4 group-hover:bg-canina-blue group-hover:text-white transition-all shadow-sm flex-shrink-0">
<Activity className="w-5 h-5 sm:w-6 sm:h-6" />
</div>
<h3 className="text-base sm:text-lg font-black text-medical-gray-900 sm:mb-2 font-vazir">تطبیق علائم بالینی</h3>
<h3 className="text-base sm:text-lg font-black text-medical-gray-900 sm:mb-2 font-vazir">
{getText('advisor_card2_title', 'تطبیق علائم بالینی')}
</h3>
</div>
<p className="text-xs text-medical-gray-500 font-medium leading-relaxed font-vazir">
با انتخاب علائمی مثل لنگیدن یا ریزش مو، دقیق‌ترین راهکار مکمل آلمانی به همراه دلایل علمی به شما پیشنهاد می‌شود.
{getText('advisor_card2_desc', 'با انتخاب علائمی مثل لنگیدن یا ریزش مو، دقیق‌ترین راهکار مکمل آلمانی به همراه دلایل علمی به شما پیشنهاد می‌شود.')}
</p>
</div>
<div className="mt-3 sm:mt-4 pt-3 sm:pt-4 border-t border-medical-gray-100 text-[10px] font-black text-canina-blue flex items-center gap-1 font-vazir">
<Check className="w-3.5 h-3.5" />
پیشنهاد هدفمند و تخصصی
{getText('advisor_card2_footer', 'پیشنهاد هدفمند و تخصصی')}
</div>
</div>
@@ -288,15 +292,17 @@ export default function SmartAdvisor({ onComplete, rules = [] }: SmartAdvisorPro
<div className="w-9 h-9 sm:w-12 sm:h-12 bg-canina-blue/10 rounded-xl sm:rounded-2xl flex items-center justify-center text-canina-blue sm:mb-4 group-hover:bg-canina-blue group-hover:text-white transition-all shadow-sm flex-shrink-0">
<ShieldCheck className="w-5 h-5 sm:w-6 sm:h-6" />
</div>
<h3 className="text-base sm:text-lg font-black text-medical-gray-900 sm:mb-2 font-vazir">پایش موجودی و یادآور</h3>
<h3 className="text-base sm:text-lg font-black text-medical-gray-900 sm:mb-2 font-vazir">
{getText('advisor_card3_title', 'پایش موجودی و یادآور')}
</h3>
</div>
<p className="text-xs text-medical-gray-500 font-medium leading-relaxed font-vazir">
زمان‌های مصرف مکمل‌ها تنظیم شده و سیستم قبل از اتمام دوره درمانی، هشدار شارژ مجدد ارسال خواهد کرد.
{getText('advisor_card3_desc', 'زمان‌های مصرف مکمل‌ها تنظیم شده و سیستم قبل از اتمام دوره درمانی، هشدار شارژ مجدد ارسال خواهد کرد.')}
</p>
</div>
<div className="mt-3 sm:mt-4 pt-3 sm:pt-4 border-t border-medical-gray-100 text-[10px] font-black text-canina-blue flex items-center gap-1 font-vazir">
<Check className="w-3.5 h-3.5" />
تکمیل منظم دوره درمان
{getText('advisor_card3_footer', 'تکمیل منظم دوره درمان')}
</div>
</div>
</motion.div>
+1 -1
View File
@@ -45,7 +45,7 @@ export async function getSeoConfig(): Promise<SeoConfig> {
const apiBase =
process.env.INTERNAL_API_URL ||
process.env.NEXT_PUBLIC_API_URL ||
'http://localhost:4001/api';
(process.env.NODE_ENV === 'production' ? 'https://api.canina.ir/api' : 'http://127.0.0.1:4400/api');
try {
const res = await fetch(`${apiBase}/settings/ui-texts`, {
Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 943 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

@@ -0,0 +1 @@
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}