Align admin orders with the shop pre-order flow.
Admins create product-based pre-orders, price real line items, reach final approval after cash or checks, and only ship eligible orders. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -10,6 +10,7 @@ import { ApiError } from '@/services/http'
|
||||
import { SHIPMENT_STATUS_BADGE, SHIPMENT_STATUS_LABELS } from '@/utils/adminLabels'
|
||||
import { formatDateTime, formatMeterage } from '@/utils/format'
|
||||
import { useToast } from '@/composables/useToast'
|
||||
import { canCreateShipment } from '@/utils/orderStatus'
|
||||
import type { Order, Shipment, ShipmentStatus } from '@/types'
|
||||
|
||||
const route = useRoute()
|
||||
@@ -70,7 +71,7 @@ const isFormValid = computed(() => form.orderId.trim() && form.carrier.trim())
|
||||
|
||||
const availableOrders = computed(() => {
|
||||
const shippedIds = new Set(shipmentList.value.map((s) => s.orderId))
|
||||
return orders.value.filter((o) => !shippedIds.has(o.id))
|
||||
return orders.value.filter((o) => !shippedIds.has(o.id) && canCreateShipment(o))
|
||||
})
|
||||
|
||||
const orderSelectOptions = computed(() =>
|
||||
|
||||
Reference in New Issue
Block a user