@@ -22,7 +49,7 @@
? 'bg-brand-600 text-white'
: 'bg-surface-3 text-muted hover:text-text'
"
- @click="$emit('select', cat.id)"
+ @click="emit('select', cat.id)"
>
{{ cat.title }}
@@ -37,7 +64,12 @@ defineProps<{
selectedId: string | null;
}>();
-defineEmits<{
+const emit = defineEmits<{
select: [categoryId: string | null];
}>();
+
+function onSelectChange(event: Event) {
+ const value = (event.target as HTMLSelectElement).value;
+ emit('select', value || null);
+}
diff --git a/src/components/home/HomeBusinessCard.vue b/src/components/home/HomeBusinessCard.vue
index 0c24a91..0f73d61 100644
--- a/src/components/home/HomeBusinessCard.vue
+++ b/src/components/home/HomeBusinessCard.vue
@@ -1,48 +1,55 @@
-
+
![]()
-
+
+
+ {{ business.category.title }}
+
-
{{ business.title }}
+
+
+
+ {{ business.title }}
+
+
+
-
+
+ {{ summary }}
+
-
- {{ business.description }}
-
-
-
- {{ business.category.title }}
-
-
-
-
- {{ business.address }}
-
+
+
+ {{ business.address }}
+
+
@@ -59,4 +66,5 @@ const props = defineProps<{
}>();
const cover = computed(() => businessCoverUrl(props.business.images));
+const summary = computed(() => props.business.subtitle?.trim() || '');
diff --git a/src/components/home/HomeBusinessList.vue b/src/components/home/HomeBusinessList.vue
index 10c716f..cb6cc0f 100644
--- a/src/components/home/HomeBusinessList.vue
+++ b/src/components/home/HomeBusinessList.vue
@@ -13,20 +13,9 @@
>
کسبوکاری یافت نشد.
-
diff --git a/src/components/home/HomeDiscoveryContent.vue b/src/components/home/HomeDiscoveryContent.vue
index aa6b3ab..4468fb9 100644
--- a/src/components/home/HomeDiscoveryContent.vue
+++ b/src/components/home/HomeDiscoveryContent.vue
@@ -117,10 +117,20 @@ watch(selectedCategoryId, () => {
void loadBusinesses();
});
+watch(
+ () => [auth.isLoggedIn, auth.user?.id, auth.user?.role] as const,
+ async () => {
+ if (auth.isLoggedIn) {
+ await auth.loadUser();
+ await ensureLoaded(true);
+ }
+ },
+);
+
onMounted(async () => {
if (auth.isLoggedIn) {
await auth.loadUser();
- await ensureLoaded();
+ await ensureLoaded(true);
}
await loadCategories();
await loadBusinesses();
diff --git a/src/components/home/HomeHeroSection.vue b/src/components/home/HomeHeroSection.vue
index 77dd1ed..c280bff 100644
--- a/src/components/home/HomeHeroSection.vue
+++ b/src/components/home/HomeHeroSection.vue
@@ -88,7 +88,7 @@ import { storeToRefs } from 'pinia';
import BusinessImageGallery from '@/components/business/BusinessImageGallery.vue';
import AppIcon from '@/components/ui/AppIcon.vue';
import { useTenantStore } from '@/stores/tenant';
-import type { AppIconName } from '@/types/icons';
+import { resolveBusinessHighlights } from '@/constants/business-highlights';
const props = withDefaults(
defineProps<{
@@ -111,9 +111,7 @@ const heroSubtitle = computed(() => landingBusiness.value?.subtitle?.trim() ?? '
const heroDescription = computed(() => landingBusiness.value?.description?.trim() ?? '');
-const highlights: { label: string; icon: AppIconName }[] = [
- { label: 'رضایت مشتریان', icon: 'shield' },
- { label: 'تجهیزات مدرن', icon: 'settings' },
- { label: 'مواد شوینده با کیفیت', icon: 'droplet' },
-];
+const highlights = computed(() =>
+ resolveBusinessHighlights(landingBusiness.value?.heroHighlightKeys),
+);
diff --git a/src/components/owner/BusinessHighlightPicker.vue b/src/components/owner/BusinessHighlightPicker.vue
new file mode 100644
index 0000000..9dc27be
--- /dev/null
+++ b/src/components/owner/BusinessHighlightPicker.vue
@@ -0,0 +1,73 @@
+
+
+
+
+
+ حداکثر ۳ مورد برای نمایش در صفحه اصلی کسبوکار. اگر چیزی انتخاب نکنید، موارد پیشفرض نمایش داده میشود.
+
+
+
+
+
+
{{ modelValue.length }} از ۳ انتخاب شده
+
+
+
+
diff --git a/src/components/ui/AppIcon.vue b/src/components/ui/AppIcon.vue
index a8c40ba..a52ca66 100644
--- a/src/components/ui/AppIcon.vue
+++ b/src/components/ui/AppIcon.vue
@@ -21,6 +21,7 @@ import { computed } from 'vue';
import {
Gift,
Info,
+ LogOut,
Armchair,
ArrowRight,
BadgePercent,
@@ -111,6 +112,7 @@ const iconMap: Record
= {
zap: Zap,
gift: Gift,
info: Info,
+ 'log-out': LogOut,
};
const props = withDefaults(
diff --git a/src/components/ui/AppSelect.vue b/src/components/ui/AppSelect.vue
index 968e088..5a3b674 100644
--- a/src/components/ui/AppSelect.vue
+++ b/src/components/ui/AppSelect.vue
@@ -6,6 +6,7 @@