Move settlement after invoice and wire real notification inbox.

Submit orders without choosing payment first, route cash/check flows under /orders/:id, show status-based next actions, and connect the header bell to unread notifications.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-09 12:00:18 +03:30
co-authored by Cursor
parent 6ee3c6f1f8
commit 7acd225fad
23 changed files with 805 additions and 333 deletions
+17 -3
View File
@@ -1,16 +1,30 @@
<script setup lang="ts">
import { useRouter } from 'vue-router'
import { computed, watch } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { useOrderStore } from '@/stores/order'
import PageHeader from '@/components/layout/PageHeader.vue'
import IconCheckBook from '@/components/icons/IconCheckBook.vue'
import IconEditPen from '@/components/icons/IconEditPen.vue'
const route = useRoute()
const router = useRouter()
const orderStore = useOrderStore()
const orderId = computed(() => route.params.id as string)
watch(
orderId,
async (id) => {
if (!id) return
if (!orderStore.getOrderById(id)) await orderStore.fetchOrder(id)
if (orderStore.draftOrderId !== id) orderStore.startCheckDraft(id)
},
{ immediate: true },
)
function selectMode(mode: 'full' | 'brief') {
orderStore.setCheckMode(mode)
router.push('/checkout/check-form')
router.push(`/orders/${orderId.value}/check-form`)
}
</script>
@@ -21,7 +35,7 @@ function selectMode(mode: 'full' | 'brief') {
subtitle="نحوه ثبت اطلاعات چک‌ها را انتخاب کنید"
show-back
centered
@back="router.push('/checkout/settlement')"
@back="router.push(`/orders/${orderId}`)"
/>
<div class="page__scroll check-mode-page__scroll">