153 lines
13 KiB
PHP
153 lines
13 KiB
PHP
<?php
|
|
// Prevent direct access
|
|
if (!defined('ABSPATH')) {
|
|
exit;
|
|
}
|
|
|
|
$current_page = sanitize_text_field($_GET['page'] ?? 'sodino-competitor-price');
|
|
?>
|
|
<div id="sodino-app" class="min-h-screen bg-gray-50" dir="rtl">
|
|
<div class="bg-white border-b border-gray-200">
|
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
|
<div class="py-6">
|
|
<div class="flex items-center justify-between">
|
|
<div>
|
|
<h1 class="text-3xl font-bold text-gray-900"><?php _e('سودینو', 'sodino'); ?></h1>
|
|
<p class="mt-1 text-sm text-gray-500"><?php _e('بهینهسازی هوشمند فروش', 'sodino'); ?></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
|
<?php if (function_exists('sodino_render_admin_notice')) { sodino_render_admin_notice(); } ?>
|
|
<div class="flex gap-8">
|
|
<aside class="w-64 flex-shrink-0">
|
|
<div class="bg-white rounded-lg shadow-sm border border-gray-200 p-6">
|
|
<h2 class="text-lg font-semibold text-gray-900 mb-4"><?php _e('منوی سودینو', 'sodino'); ?></h2>
|
|
<nav class="space-y-2">
|
|
<a href="<?php echo admin_url('admin.php?page=sodino-dashboard'); ?>" class="block px-3 py-2 rounded-md text-sm font-medium <?php echo $current_page === 'sodino-dashboard' ? 'bg-blue-50 text-blue-700 border-r-2 border-blue-700' : 'text-gray-600 hover:bg-gray-50 hover:text-gray-900'; ?>">
|
|
<?php _e('داشبورد', 'sodino'); ?>
|
|
</a>
|
|
<a href="<?php echo admin_url('admin.php?page=sodino-rules'); ?>" class="block px-3 py-2 rounded-md text-sm font-medium <?php echo $current_page === 'sodino-rules' ? 'bg-blue-50 text-blue-700 border-r-2 border-blue-700' : 'text-gray-600 hover:bg-gray-50 hover:text-gray-900'; ?>">
|
|
<?php _e('قوانین', 'sodino'); ?>
|
|
</a>
|
|
<a href="<?php echo admin_url('admin.php?page=sodino-add-rule'); ?>" class="block px-3 py-2 rounded-md text-sm font-medium <?php echo $current_page === 'sodino-add-rule' ? 'bg-blue-50 text-blue-700 border-r-2 border-blue-700' : 'text-gray-600 hover:bg-gray-50 hover:text-gray-900'; ?>">
|
|
<?php _e('افزودن قانون', 'sodino'); ?>
|
|
</a>
|
|
<a href="<?php echo admin_url('admin.php?page=sodino-upsells'); ?>" class="block px-3 py-2 rounded-md text-sm font-medium <?php echo $current_page === 'sodino-upsells' ? 'bg-blue-50 text-blue-700 border-r-2 border-blue-700' : 'text-gray-600 hover:bg-gray-50 hover:text-gray-900'; ?>">
|
|
<?php _e('آپسل (پیشنهاد فروش)', 'sodino'); ?>
|
|
</a>
|
|
<a href="<?php echo admin_url('admin.php?page=sodino-add-upsell'); ?>" class="block px-3 py-2 rounded-md text-sm font-medium <?php echo $current_page === 'sodino-add-upsell' ? 'bg-blue-50 text-blue-700 border-r-2 border-blue-700' : 'text-gray-600 hover:bg-gray-50 hover:text-gray-900'; ?>">
|
|
<?php _e('افزودن آپسل', 'sodino'); ?>
|
|
</a>
|
|
<a href="<?php echo admin_url('admin.php?page=sodino-banners'); ?>" class="block px-3 py-2 rounded-md text-sm font-medium <?php echo $current_page === 'sodino-banners' ? 'bg-blue-50 text-blue-700 border-r-2 border-blue-700' : 'text-gray-600 hover:bg-gray-50 hover:text-gray-900'; ?>">
|
|
<?php _e('بنرهای هوشمند', 'sodino'); ?>
|
|
</a>
|
|
<a href="<?php echo admin_url('admin.php?page=sodino-add-banner'); ?>" class="block px-3 py-2 rounded-md text-sm font-medium <?php echo $current_page === 'sodino-add-banner' ? 'bg-blue-50 text-blue-700 border-r-2 border-blue-700' : 'text-gray-600 hover:bg-gray-50 hover:text-gray-900'; ?>">
|
|
<?php _e('افزودن بنر', 'sodino'); ?>
|
|
</a>
|
|
<a href="<?php echo admin_url('admin.php?page=sodino-competitor-price'); ?>" class="block px-3 py-2 rounded-md text-sm font-medium <?php echo $current_page === 'sodino-competitor-price' ? 'bg-blue-50 text-blue-700 border-r-2 border-blue-700' : 'text-gray-600 hover:bg-gray-50 hover:text-gray-900'; ?>">
|
|
<?php _e('قیمت رقبا (بهزودی)', 'sodino'); ?>
|
|
</a>
|
|
<a href="<?php echo admin_url('admin.php?page=sodino-settings'); ?>" class="block px-3 py-2 rounded-md text-sm font-medium <?php echo $current_page === 'sodino-settings' ? 'bg-blue-50 text-blue-700 border-r-2 border-blue-700' : 'text-gray-600 hover:bg-gray-50 hover:text-gray-900'; ?>">
|
|
<?php _e('تنظیمات', 'sodino'); ?>
|
|
</a>
|
|
</nav>
|
|
</div>
|
|
</aside>
|
|
|
|
<main class="flex-1 min-w-0">
|
|
<div class="bg-white rounded-lg shadow-sm border border-gray-200 p-6 mb-8">
|
|
<div class="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">
|
|
<div>
|
|
<h2 class="text-2xl font-semibold text-gray-900"><?php _e('قیمت رقبا', 'sodino'); ?></h2>
|
|
<p class="mt-2 text-gray-600"><?php _e('بهزودی بخش مانیتورینگ قیمت رقبا فعال خواهد شد.', 'sodino'); ?></p>
|
|
</div>
|
|
<span class="inline-flex items-center rounded-full bg-yellow-50 px-3 py-1 text-sm font-medium text-yellow-700"><?php _e('بهزودی', 'sodino'); ?></span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="grid gap-6 lg:grid-cols-3">
|
|
<div class="lg:col-span-2 bg-white rounded-2xl border border-gray-200 shadow-sm p-6">
|
|
<h3 class="text-lg font-semibold text-gray-900 mb-4"><?php _e('مشخصات رقیب', 'sodino'); ?></h3>
|
|
<p class="text-sm text-gray-500 mb-6"><?php _e('این قابلیت به شما امکان میدهد قیمت محصولات خود را با رقبا مقایسه کرده و بهینهسازی کنید. (در نسخههای آینده فعال خواهد شد)', 'sodino'); ?></p>
|
|
|
|
<div class="overflow-x-auto rounded-xl border border-gray-200">
|
|
<table class="min-w-full divide-y divide-gray-200 text-right text-sm text-gray-700">
|
|
<thead class="bg-gray-50 text-gray-500">
|
|
<tr>
|
|
<th class="px-4 py-3 font-medium"><?php _e('محصول', 'sodino'); ?></th>
|
|
<th class="px-4 py-3 font-medium"><?php _e('قیمت شما', 'sodino'); ?></th>
|
|
<th class="px-4 py-3 font-medium"><?php _e('قیمت رقبا', 'sodino'); ?></th>
|
|
<th class="px-4 py-3 font-medium"><?php _e('اختلاف قیمت', 'sodino'); ?></th>
|
|
<th class="px-4 py-3 font-medium"><?php _e('وضعیت', 'sodino'); ?></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-gray-200 bg-white">
|
|
<tr>
|
|
<td class="px-4 py-3"><?php _e('کفش دویدن', 'sodino'); ?></td>
|
|
<td class="px-4 py-3">23,500 تومان</td>
|
|
<td class="px-4 py-3">24,900 تومان</td>
|
|
<td class="px-4 py-3 text-green-600">1,400 تومان کمتر</td>
|
|
<td class="px-4 py-3"><span class="rounded-full bg-green-50 px-3 py-1 text-xs font-semibold text-green-700"><?php _e('رقبتی', 'sodino'); ?></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="px-4 py-3"><?php _e('کرم محافظ پوست', 'sodino'); ?></td>
|
|
<td class="px-4 py-3">78,000 تومان</td>
|
|
<td class="px-4 py-3">82,000 تومان</td>
|
|
<td class="px-4 py-3 text-green-600">4,000 تومان کمتر</td>
|
|
<td class="px-4 py-3"><span class="rounded-full bg-green-50 px-3 py-1 text-xs font-semibold text-green-700"><?php _e('رقبتی', 'sodino'); ?></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="px-4 py-3"><?php _e('کیف دستی', 'sodino'); ?></td>
|
|
<td class="px-4 py-3">155,000 تومان</td>
|
|
<td class="px-4 py-3">161,000 تومان</td>
|
|
<td class="px-4 py-3 text-red-600">6,000 تومان بیشتر</td>
|
|
<td class="px-4 py-3"><span class="rounded-full bg-gray-50 px-3 py-1 text-xs font-semibold text-gray-700"><?php _e('هشدار', 'sodino'); ?></span></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="space-y-6">
|
|
<div class="bg-white rounded-2xl border border-gray-200 shadow-sm p-6">
|
|
<div class="flex items-center justify-between mb-4">
|
|
<h3 class="text-lg font-semibold text-gray-900"><?php _e('افزودن رقیب', 'sodino'); ?></h3>
|
|
<span class="rounded-full bg-blue-50 px-3 py-1 text-xs font-semibold text-blue-700"><?php _e('بهزودی', 'sodino'); ?></span>
|
|
</div>
|
|
<div class="space-y-4">
|
|
<div>
|
|
<label class="block text-sm font-medium text-gray-700 mb-2"><?php _e('URL سایت رقیب', 'sodino'); ?></label>
|
|
<input type="url" disabled class="w-full rounded-lg border border-gray-200 bg-gray-100 px-4 py-3 text-gray-500 shadow-sm" placeholder="https://example.com">
|
|
</div>
|
|
<div>
|
|
<label class="block text-sm font-medium text-gray-700 mb-2"><?php _e('نام فروشگاه', 'sodino'); ?></label>
|
|
<input type="text" disabled class="w-full rounded-lg border border-gray-200 bg-gray-100 px-4 py-3 text-gray-500 shadow-sm" placeholder="<?php _e('مثلاً اسم فروشگاه رقبا', 'sodino'); ?>">
|
|
</div>
|
|
<button disabled class="w-full rounded-full bg-gray-300 px-4 py-3 text-sm font-semibold text-gray-700"><?php _e('افزودن', 'sodino'); ?></button>
|
|
</div>
|
|
</div>
|
|
<div class="bg-white rounded-2xl border border-gray-200 shadow-sm p-6">
|
|
<div class="flex items-center justify-between mb-4">
|
|
<div>
|
|
<h3 class="text-lg font-semibold text-gray-900"><?php _e('فعالسازی مانیتورینگ قیمت', 'sodino'); ?></h3>
|
|
<p class="mt-1 text-sm text-gray-500"><?php _e('این ویژگی در نسخههای آینده فعال میشود.', 'sodino'); ?></p>
|
|
</div>
|
|
<div class="flex items-center gap-3">
|
|
<span class="px-3 py-1 rounded-full bg-gray-100 text-xs font-semibold text-gray-600"><?php _e('غیرفعال', 'sodino'); ?></span>
|
|
</div>
|
|
</div>
|
|
<div class="rounded-2xl border border-gray-200 bg-gray-50 p-5 text-sm text-gray-500">
|
|
<?php _e('در اینجا میتوانید فعالسازی خودکار تحلیل قیمت رقبا را مشاهده کنید؛ در حال حاضر این بخش در دست ساخت است.', 'sodino'); ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
</div>
|
|
</div>
|
|
</div>
|