Обновлен компонент MessengerAttachments: добавлено свойство aria-hidden для иконок изображений, улучшена доступность. Удалены устаревшие интерфейсы WildberriesCard и SelectedCard из компонентов create-supply-form и wb-product-cards, улучшена структура кода.
This commit is contained in:
@ -34,46 +34,9 @@ import { apolloClient } from '@/lib/apollo-client'
|
||||
import { GET_MY_COUNTERPARTIES, GET_COUNTERPARTY_SERVICES, GET_COUNTERPARTY_SUPPLIES } from '@/graphql/queries'
|
||||
import { CREATE_WILDBERRIES_SUPPLY } from '@/graphql/mutations'
|
||||
import { toast } from 'sonner'
|
||||
import { SelectedCard, FulfillmentService, ConsumableService, WildberriesCard } from '@/types/supplies'
|
||||
|
||||
interface WildberriesCard {
|
||||
nmID: number
|
||||
vendorCode: string
|
||||
sizes: Array<{
|
||||
chrtID: number
|
||||
techSize: string
|
||||
wbSize: string
|
||||
price: number
|
||||
discountedPrice: number
|
||||
quantity: number
|
||||
}>
|
||||
mediaFiles: string[]
|
||||
object: string
|
||||
parent: string
|
||||
countryProduction: string
|
||||
supplierVendorCode: string
|
||||
brand: string
|
||||
title: string
|
||||
description: string
|
||||
}
|
||||
|
||||
interface SelectedCard {
|
||||
card: WildberriesCard
|
||||
selectedQuantity: number
|
||||
customPrice: number // Пользовательская цена за все количество
|
||||
selectedFulfillmentOrg: string // ID выбранной FF организации
|
||||
selectedFulfillmentServices: string[] // ID выбранных услуг FF (множественный выбор)
|
||||
selectedConsumableOrg: string // ID выбранной организации расходников
|
||||
selectedConsumableServices: string[] // ID выбранных расходников (множественный выбор)
|
||||
deliveryDate: string
|
||||
}
|
||||
|
||||
interface FulfillmentService {
|
||||
id: string
|
||||
name: string
|
||||
description?: string
|
||||
price: number
|
||||
organizationName: string
|
||||
}
|
||||
|
||||
interface Organization {
|
||||
id: string
|
||||
@ -519,7 +482,12 @@ export function WBProductCards({ onBack, onComplete }: WBProductCardsProps) {
|
||||
selectedFulfillmentServices: [],
|
||||
selectedConsumableOrg: '',
|
||||
selectedConsumableServices: [],
|
||||
deliveryDate: ''
|
||||
deliveryDate: '',
|
||||
selectedMarket: '',
|
||||
selectedPlace: '',
|
||||
sellerName: '',
|
||||
sellerPhone: '',
|
||||
selectedServices: []
|
||||
}
|
||||
return [...prev, newSelectedCard]
|
||||
}
|
||||
|
Reference in New Issue
Block a user