feat: limit checkout payment options from product rules

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-11-16 09:25:46 +03:30
co-authored by Cursor
parent ec0b5eead4
commit bde75ecf07
58 changed files with 122 additions and 58 deletions
@@ -10,7 +10,7 @@ import IconLightbulb from '@/components/icons/IconLightbulb.vue'
import IconLayoutGrid from '@/components/icons/IconLayoutGrid.vue'
import IconDiamond from '@/components/icons/IconDiamond.vue'
import { formatMeterage, formatNumber } from '@/utils/format'
import type { CartItem, SettlementType } from '@/types'
import type { CartItem, PaymentLimits, SettlementType } from '@/types'
import PreorderPaymentFields from '@/components/orders/PreorderPaymentFields.vue'
defineProps<{
@@ -30,6 +30,7 @@ defineProps<{
submitting?: boolean
settlementType: SettlementType | null
checkTermMonths: number | null
paymentLimits?: PaymentLimits
}>()
const emit = defineEmits<{
@@ -188,6 +189,8 @@ const quickLinks = [
<PreorderPaymentFields
:settlement-type="settlementType"
:check-term-months="checkTermMonths"
:allowed-methods="paymentLimits?.methods"
:max-check-months="paymentLimits?.maxCheckMonths"
@update:settlement-type="emit('update:settlementType', $event)"
@update:check-term-months="emit('update:checkTermMonths', $event)"
/>