Добавлены модели товаров и корзины для оптовиков, реализованы соответствующие мутации и запросы в GraphQL. Обновлен API для загрузки файлов с учетом новых типов данных. Улучшена обработка ошибок и добавлены новые функции для работы с категориями товаров.

This commit is contained in:
Bivekich
2025-07-17 16:36:07 +03:00
parent 6a94d51032
commit f377fbab5f
21 changed files with 3958 additions and 34 deletions

View File

@ -64,7 +64,7 @@ interface UseAuthReturn {
}>
// Регистрация организаций
registerFulfillmentOrganization: (phone: string, inn: string) => Promise<{
registerFulfillmentOrganization: (phone: string, inn: string, type: 'FULFILLMENT' | 'LOGIST' | 'WHOLESALE') => Promise<{
success: boolean
message: string
user?: User
@ -254,7 +254,7 @@ export const useAuth = (): UseAuthReturn => {
}
}
const registerFulfillmentOrganization = async (phone: string, inn: string) => {
const registerFulfillmentOrganization = async (phone: string, inn: string, type: 'FULFILLMENT' | 'LOGIST' | 'WHOLESALE') => {
try {
setIsLoading(true)
@ -264,7 +264,7 @@ export const useAuth = (): UseAuthReturn => {
const { data } = await registerFulfillmentMutation({
variables: {
input: { phone, inn }
input: { phone, inn, type }
}
})