Fix View My Orders navigation to select orders tab
- Add query parameter support (?tab=orders) to Market Dashboard - Update CheckoutPage to navigate with tab=orders query param - Dashboard validates tab param against allowed values 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
b89ee8bf92
commit
2366a44280
2 changed files with 7 additions and 3 deletions
|
|
@ -14,7 +14,7 @@
|
||||||
<Button @click="$router.push('/market')" variant="outline">
|
<Button @click="$router.push('/market')" variant="outline">
|
||||||
Continue Shopping
|
Continue Shopping
|
||||||
</Button>
|
</Button>
|
||||||
<Button @click="$router.push('/market/dashboard')" variant="default">
|
<Button @click="$router.push('/market/dashboard?tab=orders')" variant="default">
|
||||||
View My Orders
|
View My Orders
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,7 @@
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed, onMounted } from 'vue'
|
import { ref, computed, onMounted } from 'vue'
|
||||||
|
import { useRoute } from 'vue-router'
|
||||||
import { useMarketStore } from '@/modules/market/stores/market'
|
import { useMarketStore } from '@/modules/market/stores/market'
|
||||||
import { Badge } from '@/components/ui/badge'
|
import { Badge } from '@/components/ui/badge'
|
||||||
import {
|
import {
|
||||||
|
|
@ -77,10 +78,13 @@ import MerchantStore from '../components/MerchantStore.vue'
|
||||||
import MarketSettings from '../components/MarketSettings.vue'
|
import MarketSettings from '../components/MarketSettings.vue'
|
||||||
import { auth } from '@/composables/useAuthService'
|
import { auth } from '@/composables/useAuthService'
|
||||||
|
|
||||||
|
const route = useRoute()
|
||||||
const marketStore = useMarketStore()
|
const marketStore = useMarketStore()
|
||||||
|
|
||||||
// Local state
|
// Local state - check for tab query param
|
||||||
const activeTab = ref('overview')
|
const validTabs = ['overview', 'orders', 'store', 'settings']
|
||||||
|
const initialTab = validTabs.includes(route.query.tab as string) ? route.query.tab as string : 'overview'
|
||||||
|
const activeTab = ref(initialTab)
|
||||||
|
|
||||||
// Computed properties for tab badges
|
// Computed properties for tab badges
|
||||||
const orderCount = computed(() => {
|
const orderCount = computed(() => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue