Route shop browse through categories and catalogs, and align product detail with the mockup.
Customers can add items without a company-first path, and the detail page matches the card, badge, share, and footer layout. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -24,12 +24,7 @@ const {
|
||||
} = useCartPage()
|
||||
|
||||
function goToOrdering() {
|
||||
const companyId = cartStore.selectedCompanyId || cartStore.activeCart?.companyId
|
||||
if (companyId) {
|
||||
router.push(`/companies/${companyId}/catalogs`)
|
||||
return
|
||||
}
|
||||
router.push('/companies')
|
||||
router.push('/categories')
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -50,7 +45,7 @@ function goToOrdering() {
|
||||
@back="router.push('/')"
|
||||
@remove="removeItem"
|
||||
@checkout="proceedToCheckout"
|
||||
@select-company="router.push('/companies')"
|
||||
@select-company="goToOrdering()"
|
||||
/>
|
||||
|
||||
<DesktopCartPage
|
||||
@@ -65,7 +60,7 @@ function goToOrdering() {
|
||||
:submitting="submitting"
|
||||
@remove="removeItem"
|
||||
@checkout="proceedToCheckout"
|
||||
@select-company="router.push('/companies')"
|
||||
@select-company="goToOrdering()"
|
||||
@back="goToOrdering"
|
||||
/>
|
||||
|
||||
|
||||
@@ -88,13 +88,12 @@ const quickLinks = [
|
||||
</div>
|
||||
<h2 class="cart-empty-card__heading">سبد خرید شما خالی است</h2>
|
||||
<p class="cart-empty-card__text">
|
||||
برای ثبت سفارش جدید، ابتدا شرکت موردنظر را انتخاب کنید و سپس کالیته و محصولات
|
||||
را به سبد اضافه کنید.
|
||||
از دستهبندی یا کالیته محصول را انتخاب کنید، جزئیات را ببینید و به سبد اضافه کنید.
|
||||
</p>
|
||||
<div class="cart-empty-card__actions">
|
||||
<button type="button" class="cart-btn cart-btn--primary" @click="emit('selectCompany')">
|
||||
<IconBuilding :size="18" />
|
||||
انتخاب شرکت
|
||||
مشاهده محصولات
|
||||
</button>
|
||||
<button type="button" class="cart-btn cart-btn--outline" @click="emit('back')">
|
||||
<IconChevronLeft :size="16" />
|
||||
|
||||
@@ -106,8 +106,8 @@ const emit = defineEmits<{
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<EmptyState v-else variant="cart" message="برای شروع سفارش، یک شرکت انتخاب کنید">
|
||||
<BaseButton @click="emit('selectCompany')">انتخاب شرکت</BaseButton>
|
||||
<EmptyState v-else variant="cart" message="از دستهبندی یا کالیته محصول را انتخاب کنید">
|
||||
<BaseButton @click="emit('selectCompany')">مشاهده محصولات</BaseButton>
|
||||
</EmptyState>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user