diff --git a/frontend/components.d.ts b/frontend/components.d.ts index 5a58502..32b6069 100644 --- a/frontend/components.d.ts +++ b/frontend/components.d.ts @@ -40,12 +40,16 @@ declare module 'vue' { ElRadioButton: typeof import('element-plus/es')['ElRadioButton'] ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] ElSelect: typeof import('element-plus/es')['ElSelect'] + ElStep: typeof import('element-plus/es')['ElStep'] + ElSteps: typeof import('element-plus/es')['ElSteps'] ElSwitch: typeof import('element-plus/es')['ElSwitch'] ElTable: typeof import('element-plus/es')['ElTable'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] ElTabPane: typeof import('element-plus/es')['ElTabPane'] ElTabs: typeof import('element-plus/es')['ElTabs'] ElTag: typeof import('element-plus/es')['ElTag'] + ElTimeline: typeof import('element-plus/es')['ElTimeline'] + ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem'] ElTimePicker: typeof import('element-plus/es')['ElTimePicker'] MobileBottomNav: typeof import('./src/components/MobileBottomNav.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] diff --git a/frontend/src/views/account/OrderDetailView.vue b/frontend/src/views/account/OrderDetailView.vue index 9a2cc84..d9b86bb 100644 --- a/frontend/src/views/account/OrderDetailView.vue +++ b/frontend/src/views/account/OrderDetailView.vue @@ -106,6 +106,21 @@ const remainingHafCoinM = computed(() => { return roundQuantity(Math.max(snapshotHafCoinM.value - Number(checkoutForm.value.coin_consumed_m || 0), 0)) }) +function getOrderStep(status: string) { + const stepMap: Record = { + 'pending_payment': 0, + 'pending_handoff': 1, + 'renting': 2, + 'overdue': 2, + 'pending_checkout_confirm': 3, + 'pending_checkout_accept': 3, + 'completed': 4, + 'cancelled': 0, + 'closed': 4, + } + return stepMap[status] ?? 0 +} + onMounted(loadOrder) onBeforeUnmount(stopPaymentPolling) @@ -584,12 +599,14 @@ function linesToList(value: string) {