feat: add payment sub-option selection on quick purchase page

Show sub-options (e.g. СБП, Карта) as selectable buttons when a
payment method has multiple enabled variants. Send suffixed
payment_method ID to backend for correct provider routing.
Split LandingPaymentMethod into public and admin types.
This commit is contained in:
Fringg
2026-03-06 23:53:31 +03:00
parent d0be127d30
commit 58e93cd2b7
3 changed files with 113 additions and 36 deletions

View File

@@ -4,10 +4,10 @@ import { useSortable } from '@dnd-kit/sortable';
import { CSS } from '@dnd-kit/utilities';
import { cn } from '../../lib/utils';
import { GripIcon, TrashIcon } from '../icons/LandingIcons';
import type { LandingPaymentMethod, EditableMethodField } from '../../api/landings';
import type { AdminLandingPaymentMethod, EditableMethodField } from '../../api/landings';
import type { PaymentMethodSubOptionInfo } from '../../types';
export type MethodWithId = LandingPaymentMethod & { _id: string };
export type MethodWithId = AdminLandingPaymentMethod & { _id: string };
const ChevronDownIcon = ({ open }: { open: boolean }) => (
<svg